From 455619d3875e0e0e7a03734806d61c7998735cd4 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 10 Jun 2020 13:57:42 +0200 Subject: Adaptations for Chromium 83 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I63ed851426b18623d549ceaf87f1b6eeec527966 Reviewed-by: Jüri Valdmann --- src/core/web_engine_context.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/core/web_engine_context.cpp') diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 410ada37a..c7add160b 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -44,6 +44,8 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/power_monitor/power_monitor.h" +#include "base/power_monitor/power_monitor_device_source.h" #include "base/run_loop.h" #include "base/task/post_task.h" #include "base/task/sequence_manager/thread_controller_with_message_pump_impl.h" @@ -94,6 +96,7 @@ #include "services/tracing/public/cpp/trace_startup.h" #include "services/tracing/public/cpp/tracing_features.h" #include "third_party/blink/public/common/features.h" +#include "ui/base/ui_base_features.h" #include "ui/events/event_switches.h" #include "ui/native_theme/native_theme_features.h" #include "ui/gl/gl_switches.h" @@ -362,12 +365,12 @@ void WebEngineContext::destroy() // task runner is not working anymore so we need to do this earlier. cleanupVizProcess(); while (waitForViz) { - while (delegate->DoWork()){} + while (delegate->DoWork().is_immediate()) { } QThread::msleep(50); } destroyGpuProcess(); // Flush the UI message loop before quitting. - while (delegate->DoWork()) { } + while (delegate->DoWork().is_immediate()) { } #if QT_CONFIG(webengine_printing_and_pdf) // Kill print job manager early as it has a content::NotificationRegistrar @@ -389,7 +392,7 @@ void WebEngineContext::destroy() // Handle any events posted by browser-context shutdown. // This should deliver all nessesery calls of DeleteSoon from PostTask - while (delegate->DoWork()) { } + while (delegate->DoWork().is_immediate()) { } m_devtoolsServer.reset(); m_runLoop->AfterRun(); @@ -652,6 +655,9 @@ WebEngineContext::WebEngineContext() appendToFeatureList(disableFeatures, features::kWebUsb.name); appendToFeatureList(disableFeatures, media::kPictureInPicture.name); + // Breaks current colordialog tests. + appendToFeatureList(disableFeatures, features::kFormControlsRefresh.name); + if (useEmbeddedSwitches) { // embedded switches are based on the switches for Android, see content/browser/android/content_startup_flags.cc appendToFeatureList(enableFeatures, features::kOverlayScrollbar.name); @@ -774,6 +780,7 @@ WebEngineContext::WebEngineContext() content::BrowserTaskExecutor::PostFeatureListSetup(); tracing::InitTracingPostThreadPoolStartAndFeatureList(); m_discardableSharedMemoryManager = std::make_unique(); + base::PowerMonitor::Initialize(std::make_unique()); m_serviceManagerEnvironment = std::make_unique(content::BrowserTaskExecutor::CreateIOThread()); m_startupData = m_serviceManagerEnvironment->CreateBrowserStartupData(); -- cgit v1.2.3