summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-07-28 17:29:14 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-14 16:43:32 +0200
commitb1d423a3fc2cb3eeacc2a3e91ac9bdd2211c2613 (patch)
tree53f39e4e7c6a76d19a92fc23fde0728e6df95fc7 /src/core/web_engine_context.cpp
parentf987b713b9f4e363056bf5174a762acb5b77ed79 (diff)
Update the QtWebEngineCore library to run on top of Chromium 37
Most of the patch is about upstream classes/methods that changed. Other important details: - icu data files are now used by default - cygwin is no longer required to build on Windows - RenderFrameHost has been replacing RenderViewHost in a few places, following the separate process iframes support in Chromium - The user agent is accessed through ContentClient::GetUserAgent instead of from the command line switches Change-Id: I86cc93aff7ce31176a80b0b4a5d54025674a451c Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r--src/core/web_engine_context.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 709000c10..03681f603 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -49,21 +49,21 @@
#include "base/run_loop.h"
#include "base/threading/thread_restrictions.h"
#include "cc/base/switches.h"
+#include "content/browser/gpu/gpu_process_host.h"
+#include "content/browser/renderer_host/render_process_host_impl.h"
+#include "content/browser/utility_process_host_impl.h"
+#include "content/gpu/in_process_gpu_thread.h"
+#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/common/content_paths.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
-#include "content/public/browser/utility_process_host.h"
-#include "content/public/browser/render_process_host.h"
-#include "content/browser/gpu/gpu_process_host.h"
-#include "content/utility/in_process_utility_thread.h"
#include "content/renderer/in_process_renderer_thread.h"
-#include "content/gpu/in_process_gpu_thread.h"
+#include "content/utility/in_process_utility_thread.h"
+#include "gpu/command_buffer/service/gpu_switches.h"
#include "ui/events/event_switches.h"
#include "ui/gl/gl_switches.h"
-#include "gpu/command_buffer/service/gpu_switches.h"
-#include "webkit/common/user_agent/user_agent_util.h"
#if defined(OS_WIN)
#include "sandbox/win/src/sandbox_types.h"
#include "content/public/app/startup_helper_win.h"
@@ -135,8 +135,6 @@ WebEngineContext::WebEngineContext()
CommandLine::Init(argv.size(), argv.constData());
CommandLine* parsedCommandLine = CommandLine::ForCurrentProcess();
- // Mention the Chromium version we're based on to get passed stupid UA-string-based feature detection (several WebRTC demos need this)
- parsedCommandLine->AppendSwitchASCII(switches::kUserAgent, webkit_glue::BuildUserAgentFromProduct("QtWebEngine/" QTWEBENGINECORE_VERSION_STR " Chrome/" CHROMIUM_VERSION));
parsedCommandLine->AppendSwitchPath(switches::kBrowserSubprocessPath, WebEngineLibraryInfo::getPath(content::CHILD_PROCESS_EXE));
parsedCommandLine->AppendSwitch(switches::kNoSandbox);
parsedCommandLine->AppendSwitch(switches::kDisablePlugins);
@@ -189,17 +187,17 @@ WebEngineContext::WebEngineContext()
&& qApp->platformNativeInterface()->nativeResourceForWindow(QByteArrayLiteral("egldisplay"), 0))
parsedCommandLine->AppendSwitchASCII(switches::kUseGL, gfx::kGLImplementationEGLName);
- content::UtilityProcessHost::RegisterUtilityMainThreadFactory(content::CreateInProcessUtilityThread);
- content::RenderProcessHost::RegisterRendererMainThreadFactory(content::CreateInProcessRendererThread);
+ content::UtilityProcessHostImpl::RegisterUtilityMainThreadFactory(content::CreateInProcessUtilityThread);
+ content::RenderProcessHostImpl::RegisterRendererMainThreadFactory(content::CreateInProcessRendererThread);
content::GpuProcessHost::RegisterGpuMainThreadFactory(content::CreateInProcessGpuThread);
+ content::ContentMainParams contentMainParams(m_mainDelegate.get());
#if defined(OS_WIN)
sandbox::SandboxInterfaceInfo sandbox_info = {0};
content::InitializeSandboxInfo(&sandbox_info);
- m_contentRunner->Initialize(0, &sandbox_info, m_mainDelegate.get());
-#else
- m_contentRunner->Initialize(0, 0, m_mainDelegate.get());
+ contentMainParams.sandbox_info = &sandbox_info;
#endif
+ m_contentRunner->Initialize(contentMainParams);
m_browserRunner->Initialize(content::MainFunctionParams(*CommandLine::ForCurrentProcess()));
// Once the MessageLoop has been created, attach a top-level RunLoop.