diff options
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r-- | src/core/web_engine_context.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index f4574f8b3..09e131272 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -58,6 +58,7 @@ #include "content/public/app/content_main.h" #include "content/public/app/content_main_runner.h" #include "content/public/browser/browser_main_runner.h" +#include "content/public/browser/plugin_service.h" #include "content/public/browser/render_frame_host.h" #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" @@ -70,7 +71,7 @@ #include "ui/gl/gl_switches.h" #if defined(OS_WIN) #include "sandbox/win/src/sandbox_types.h" -#include "content/public/app/startup_helper_win.h" +#include "content/public/app/sandbox_helper_win.h" #endif // OS_WIN #include "browser_context_adapter.h" @@ -149,6 +150,12 @@ bool usingQtQuick2DRenderer() return device == QLatin1String("softwarecontext"); } +#if defined(ENABLE_PLUGINS) +void dummyGetPluginCallback(const std::vector<content::WebPluginInfo>&) +{ +} +#endif + } // namespace namespace QtWebEngineCore { @@ -236,8 +243,7 @@ WebEngineContext::WebEngineContext() parsedCommandLine->AppendSwitch(switches::kInProcessGPU); // These are currently only default on OS X, and we don't support them: parsedCommandLine->AppendSwitch(switches::kDisableZeroCopy); - parsedCommandLine->AppendSwitch(switches::kDisableNativeGpuMemoryBuffers); - parsedCommandLine->AppendSwitch(switches::kDisableGpuMemoryBufferVideoFrames); + parsedCommandLine->AppendSwitch(switches::kDisableGpuMemoryBufferCompositorResources); if (useEmbeddedSwitches) { // Inspired by the Android port's default switches @@ -291,6 +297,16 @@ WebEngineContext::WebEngineContext() // first gets referenced on the IO thread. MediaCaptureDevicesDispatcher::GetInstance(); +#if defined(ENABLE_PLUGINS) + // Creating pepper plugins from the page (which calls PluginService::GetPluginInfoArray) + // might fail unless the page queried the list of available plugins at least once + // (which ends up calling PluginService::GetPlugins). Since the plugins list can only + // be created from the FILE thread, and that GetPluginInfoArray is synchronous, it + // can't loads plugins synchronously from the IO thread to serve the render process' request + // and we need to make sure that it happened beforehand. + content::PluginService::GetInstance()->GetPlugins(base::Bind(&dummyGetPluginCallback)); +#endif + #if defined(ENABLE_BASIC_PRINTING) m_printJobManager.reset(new printing::PrintJobManager()); #endif // defined(ENABLE_BASIC_PRINTING) |