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

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

Issue 2916823002: Move Mus into chrome's process when running with --mus.
Patch Set: Addressing most feedback, making this work on device. 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 cb42d4df66818aea86a32f6e182583d6f697552e..76eb09432a68698bdc246241ee90222f866e11ca 100644
--- a/services/ui/gpu/gpu_main.cc
+++ b/services/ui/gpu/gpu_main.cc
@@ -52,8 +52,12 @@ GpuMain::GpuMain(mojom::GpuMainRequest request)
: gpu_thread_("GpuThread"),
io_thread_("GpuIOThread"),
compositor_thread_("DisplayCompositorThread"),
- power_monitor_(base::MakeUnique<base::PowerMonitorDeviceSource>()),
binding_(this) {
+ // TODO: OK?
+ if (!base::PowerMonitor::Get())
+ power_monitor_.reset(new base::PowerMonitor(
+ base::MakeUnique<base::PowerMonitorDeviceSource>()));
+
base::Thread::Options thread_options;
#if defined(OS_WIN)
« no previous file with comments | « services/ui/gpu/gpu_main.h ('k') | services/ui/main.cc » ('j') | services/ui/service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698