summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-09 17:04:10 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-07-10 10:26:29 +0200
commit0a01998411de6a46af8d0b0ae13b8f401cd14a4b (patch)
tree7c27c908723628b70b21bfb52428c72acf050a71 /src/core/web_engine_context.cpp
parent3c34f95ad4a96737f66ab4933edb9e00abecdc24 (diff)
Adaptations for Chromium 74
Change-Id: Icdefa05eec39c632328dfc40862e5b734170bf3f Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r--src/core/web_engine_context.cpp28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index a3a5881bf..1b82b6174 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -44,9 +44,9 @@
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
-#include "base/message_loop/message_loop_impl.h"
#include "base/run_loop.h"
#include "base/task/post_task.h"
+#include "base/task/sequence_manager/thread_controller_with_message_pump_impl.h"
#include "base/threading/thread_restrictions.h"
#include "cc/base/switches.h"
#if QT_CONFIG(webengine_printing_and_pdf)
@@ -77,6 +77,7 @@
#include "mojo/core/embedder/embedder.h"
#include "net/base/port_util.h"
#include "ppapi/buildflags/buildflags.h"
+#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/resource_coordinator/public/cpp/resource_coordinator_features.h"
#include "services/service_manager/sandbox/switches.h"
@@ -241,7 +242,8 @@ void WebEngineContext::destroy()
destroyGpuProcess();
base::MessagePump::Delegate *delegate =
- static_cast<base::MessageLoopImpl *>(m_runLoop->delegate_);
+ static_cast<base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl *>(
+ m_runLoop->delegate_);
// Flush the UI message loop before quitting.
while (delegate->DoWork()) { }
@@ -499,9 +501,12 @@ WebEngineContext::WebEngineContext()
appendToFeatureList(disableFeatures, features::kMojoVideoCapture.name);
// Breaks WebEngineNewViewRequest.userInitiated API (since 73)
appendToFeatureList(disableFeatures, features::kUserActivationV2.name);
+ appendToFeatureList(disableFeatures, features::kWebAuth.name);
appendToFeatureList(disableFeatures, features::kBackgroundFetch.name);
+ appendToFeatureList(disableFeatures, network::features::kNetworkService.name);
+
#if QT_CONFIG(webengine_printing_and_pdf)
appendToFeatureList(disableFeatures, printing::features::kUsePdfCompositorServiceForPrint.name);
#endif
@@ -612,11 +617,6 @@ WebEngineContext::WebEngineContext()
SetContentClient(new ContentClientQt);
- content::StartBrowserTaskScheduler();
- content::BrowserTaskExecutor::Create();
-
- mojo::core::Init();
-
content::ContentMainParams contentMainParams(m_mainDelegate.get());
#if defined(OS_WIN)
sandbox::SandboxInterfaceInfo sandbox_info = {0};
@@ -624,12 +624,24 @@ WebEngineContext::WebEngineContext()
contentMainParams.sandbox_info = &sandbox_info;
#endif
m_contentRunner->Initialize(contentMainParams);
- m_browserRunner->Initialize(content::MainFunctionParams(*base::CommandLine::ForCurrentProcess()));
+
+ mojo::core::Init();
+
+ // This block mirrors ContentMainRunnerImpl::RunServiceManager():
+ m_mainDelegate->PreCreateMainMessageLoop();
+ base::MessageLoop::InitMessagePumpForUIFactory(messagePumpFactory);
+ content::BrowserTaskExecutor::Create();
+ m_mainDelegate->PostEarlyInitialization(false);
+ content::StartBrowserTaskScheduler();
+ content::BrowserTaskExecutor::PostFeatureListSetup();
// Once the MessageLoop has been created, attach a top-level RunLoop.
m_runLoop.reset(new base::RunLoop);
m_runLoop->BeforeRun();
+ content::MainFunctionParams mainParams(*base::CommandLine::ForCurrentProcess());
+ m_browserRunner->Initialize(mainParams);
+
m_devtoolsServer.reset(new DevToolsServerQt());
m_devtoolsServer->start();
// Force the initialization of MediaCaptureDevicesDispatcher on the UI