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

Side by Side Diff: services/ui/service.cc

Issue 2281583003: services/ui: Split GpuServiceInternal into gpu vs. ws pieces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DONE_2016.08.24_mus-ws-gpu-refactor
Patch Set: tot merge Created 4 years, 3 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
« no previous file with comments | « services/ui/service.h ('k') | services/ui/ws/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/service.h" 5 #include "services/ui/service.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 #if !defined(OS_ANDROID) 173 #if !defined(OS_ANDROID)
174 event_source_ = ui::PlatformEventSource::CreateDefault(); 174 event_source_ = ui::PlatformEventSource::CreateDefault();
175 #endif 175 #endif
176 176
177 // This needs to happen after DeviceDataManager has been constructed. That 177 // This needs to happen after DeviceDataManager has been constructed. That
178 // happens either during OzonePlatform or PlatformEventSource initialization, 178 // happens either during OzonePlatform or PlatformEventSource initialization,
179 // so keep this line below both of those. 179 // so keep this line below both of those.
180 input_device_server_.RegisterAsObserver(); 180 input_device_server_.RegisterAsObserver();
181 181
182 gpu_proxy_.reset(new GpuServiceProxy());
183
184 // Gpu must be running before the PlatformScreen can be initialized. 182 // Gpu must be running before the PlatformScreen can be initialized.
185 window_server_.reset(new ws::WindowServer(this)); 183 window_server_.reset(new ws::WindowServer(this));
186 184
187 // DeviceDataManager must be initialized before TouchController. On non-Linux 185 // DeviceDataManager must be initialized before TouchController. On non-Linux
188 // platforms there is no DeviceDataManager so don't create touch controller. 186 // platforms there is no DeviceDataManager so don't create touch controller.
189 if (ui::DeviceDataManager::HasInstance()) 187 if (ui::DeviceDataManager::HasInstance())
190 touch_controller_.reset( 188 touch_controller_.reset(
191 new ws::TouchController(window_server_->display_manager())); 189 new ws::TouchController(window_server_->display_manager()));
192 } 190 }
193 191
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 pending_requests_.push_back(std::move(pending_request)); 277 pending_requests_.push_back(std::move(pending_request));
280 return; 278 return;
281 } 279 }
282 window_server_->display_manager() 280 window_server_->display_manager()
283 ->GetUserDisplayManager(remote_identity.user_id()) 281 ->GetUserDisplayManager(remote_identity.user_id())
284 ->AddDisplayManagerBinding(std::move(request)); 282 ->AddDisplayManagerBinding(std::move(request));
285 } 283 }
286 284
287 void Service::Create(const shell::Identity& remote_identity, 285 void Service::Create(const shell::Identity& remote_identity,
288 mojom::GpuServiceRequest request) { 286 mojom::GpuServiceRequest request) {
289 gpu_proxy_->Add(std::move(request)); 287 window_server_->gpu_proxy()->Add(std::move(request));
290 } 288 }
291 289
292 void Service::Create(const shell::Identity& remote_identity, 290 void Service::Create(const shell::Identity& remote_identity,
293 mojom::IMERegistrarRequest request) { 291 mojom::IMERegistrarRequest request) {
294 ime_registrar_.AddBinding(std::move(request)); 292 ime_registrar_.AddBinding(std::move(request));
295 } 293 }
296 294
297 void Service::Create(const shell::Identity& remote_identity, 295 void Service::Create(const shell::Identity& remote_identity,
298 mojom::IMEServerRequest request) { 296 mojom::IMEServerRequest request) {
299 ime_server_.AddBinding(std::move(request)); 297 ime_server_.AddBinding(std::move(request));
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 345
348 void Service::Create(const shell::Identity& remote_identity, 346 void Service::Create(const shell::Identity& remote_identity,
349 mojom::WindowServerTestRequest request) { 347 mojom::WindowServerTestRequest request) {
350 if (!test_config_) 348 if (!test_config_)
351 return; 349 return;
352 new ws::WindowServerTestImpl(window_server_.get(), std::move(request)); 350 new ws::WindowServerTestImpl(window_server_.get(), std::move(request));
353 } 351 }
354 352
355 353
356 } // namespace ui 354 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/service.h ('k') | services/ui/ws/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698