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

Side by Side 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, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/ui/gpu/gpu_main.h" 5 #include "services/ui/gpu/gpu_main.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/power_monitor/power_monitor_device_source.h" 10 #include "base/power_monitor/power_monitor_device_source.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #endif // defined(OS_MACOSX) 44 #endif // defined(OS_MACOSX)
45 45
46 } // namespace 46 } // namespace
47 47
48 namespace ui { 48 namespace ui {
49 49
50 GpuMain::GpuMain(mojom::GpuMainRequest request) 50 GpuMain::GpuMain(mojom::GpuMainRequest request)
51 : gpu_thread_("GpuThread"), 51 : gpu_thread_("GpuThread"),
52 io_thread_("GpuIOThread"), 52 io_thread_("GpuIOThread"),
53 compositor_thread_("DisplayCompositorThread"), 53 compositor_thread_("DisplayCompositorThread"),
54 power_monitor_(base::MakeUnique<base::PowerMonitorDeviceSource>()),
55 binding_(this) { 54 binding_(this) {
55 // TODO: crbug.com/609317: Remove this when Mus Window Server and GPU are
56 // split into separate processes. Until then this is necessary to be able to
57 // run Mushrome (chrome --mus) with Mus running in the browser process.
58 if (!base::PowerMonitor::Get()) {
59 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.
60 base::MakeUnique<base::PowerMonitorDeviceSource>()));
61 }
62
56 base::Thread::Options thread_options; 63 base::Thread::Options thread_options;
57 64
58 #if defined(OS_WIN) 65 #if defined(OS_WIN)
59 thread_options.message_loop_type = base::MessageLoop::TYPE_DEFAULT; 66 thread_options.message_loop_type = base::MessageLoop::TYPE_DEFAULT;
60 #elif defined(USE_X11) 67 #elif defined(USE_X11)
61 thread_options.message_pump_factory = base::Bind(&CreateMessagePumpX11); 68 thread_options.message_pump_factory = base::Bind(&CreateMessagePumpX11);
62 #elif defined(USE_OZONE) 69 #elif defined(USE_OZONE)
63 // The MessageLoop type required depends on the Ozone platform selected at 70 // The MessageLoop type required depends on the Ozone platform selected at
64 // runtime. 71 // runtime.
65 thread_options.message_loop_type = 72 thread_options.message_loop_type =
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // TODO(sad): https://crbug.com/645602 236 // TODO(sad): https://crbug.com/645602
230 } 237 }
231 238
232 bool GpuMain::EnsureSandboxInitialized( 239 bool GpuMain::EnsureSandboxInitialized(
233 gpu::GpuWatchdogThread* watchdog_thread) { 240 gpu::GpuWatchdogThread* watchdog_thread) {
234 // TODO(sad): https://crbug.com/645602 241 // TODO(sad): https://crbug.com/645602
235 return true; 242 return true;
236 } 243 }
237 244
238 } // namespace ui 245 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698