Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1703)

Unified Diff: services/ui/gpu/gpu_main.cc

Issue 2916823002: Move Mus into chrome's process when running with --mus.
Patch Set: Undo Screen TLS change, don't use Screen::GetScreen() in Mus. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/ui/gpu/gpu_main.cc
diff --git a/services/ui/gpu/gpu_main.cc b/services/ui/gpu/gpu_main.cc
index 5f4d90b41ccbaec789791aef3c4f109c9506d571..6143fe803eb0f7039dc7b84d74be6b5085992701 100644
--- a/services/ui/gpu/gpu_main.cc
+++ b/services/ui/gpu/gpu_main.cc
@@ -51,8 +51,15 @@ GpuMain::GpuMain(mojom::GpuMainRequest request)
: gpu_thread_("GpuThread"),
io_thread_("GpuIOThread"),
compositor_thread_("DisplayCompositorThread"),
- power_monitor_(base::MakeUnique<base::PowerMonitorDeviceSource>()),
binding_(this) {
+ // TODO: crbug.com/609317: Remove this when Mus Window Server and GPU are
+ // split into separate processes. Until then this is necessary to be able to
+ // run Mushrome (chrome --mus) with Mus running in the browser process.
+ if (!base::PowerMonitor::Get()) {
+ power_monitor_.reset(new base::PowerMonitor(
sky 2017/06/27 19:58:56 MakeUnique for PowerMonitor too?
mfomitchev 2017/07/11 21:46:59 Done.
+ base::MakeUnique<base::PowerMonitorDeviceSource>()));
+ }
+
base::Thread::Options thread_options;
#if defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698