diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-14 10:07:07 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-14 18:54:49 +0200 |
commit | a3c77682ce67420ac3fba4d81847bbe170b387eb (patch) | |
tree | c22938dae751405e5f78881a7683ab3176c77a5c /src/core/web_engine_context.cpp | |
parent | d3882688a8fd70ccd4c42afd2485c3b5d3810547 (diff) | |
parent | 1c6d01b846f2152e7215c98cfa09e668c880da7e (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
src/3rdparty
src/core/certificate_error_controller.cpp
src/core/certificate_error_controller.h
src/core/compositor/compositor.cpp
src/core/compositor/compositor.h
src/core/compositor/display_gl_output_surface.cpp
src/core/content_browser_client_qt.cpp
src/core/core_chromium.pri
src/core/delegated_frame_host_client_qt.cpp
src/core/ozone/gl_share_context_qt.h
src/core/ozone/surface_factory_qt.cpp
src/core/permission_manager_qt.cpp
src/core/render_widget_host_view_qt.cpp
src/core/render_widget_host_view_qt.h
src/core/web_engine_context.cpp
src/core/web_engine_settings.cpp
src/core/web_event_factory.cpp
tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
Change-Id: Ice14c3c350b139e800c7c7011b7cef1fc7010669
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r-- | src/core/web_engine_context.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 2a5666776..a49d8103c 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" @@ -436,12 +439,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 @@ -463,7 +466,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(); @@ -696,6 +699,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); @@ -755,8 +761,6 @@ WebEngineContext::WebEngineContext() registerMainThreadFactories(); - SetContentClient(new ContentClientQt); - content::ContentMainParams contentMainParams(m_mainDelegate.get()); #if defined(OS_WIN) contentMainParams.sandbox_info = staticSandboxInterfaceInfo(); @@ -781,6 +785,7 @@ WebEngineContext::WebEngineContext() content::BrowserTaskExecutor::PostFeatureListSetup(); tracing::InitTracingPostThreadPoolStartAndFeatureList(); m_discardableSharedMemoryManager = std::make_unique<discardable_memory::DiscardableSharedMemoryManager>(); + base::PowerMonitor::Initialize(std::make_unique<base::PowerMonitorDeviceSource>()); m_serviceManagerEnvironment = std::make_unique<content::ServiceManagerEnvironment>(content::BrowserTaskExecutor::CreateIOThread()); m_startupData = m_serviceManagerEnvironment->CreateBrowserStartupData(); |