Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 registry->AddInterface<mojom::WindowManagerWindowTreeFactory>(this); | 205 registry->AddInterface<mojom::WindowManagerWindowTreeFactory>(this); |
| 206 registry->AddInterface<mojom::WindowTreeFactory>(this); | 206 registry->AddInterface<mojom::WindowTreeFactory>(this); |
| 207 if (test_config_) | 207 if (test_config_) |
| 208 registry->AddInterface<WindowServerTest>(this); | 208 registry->AddInterface<WindowServerTest>(this); |
| 209 | 209 |
| 210 // On non-Linux platforms there will be no DeviceDataManager instance and no | 210 // On non-Linux platforms there will be no DeviceDataManager instance and no |
| 211 // purpose in adding the Mojo interface to connect to. | 211 // purpose in adding the Mojo interface to connect to. |
| 212 if (input_device_server_.IsRegisteredAsObserver()) | 212 if (input_device_server_.IsRegisteredAsObserver()) |
| 213 input_device_server_.AddInterface(registry); | 213 input_device_server_.AddInterface(registry); |
| 214 | 214 |
| 215 platform_screen_->AddInterfaces(registry); | |
|
dcheng
2016/09/12 18:04:30
Dumb question: how do we guarantee that platform_s
kylechar
2016/09/12 18:28:15
In this case platform_screen_ gets destroyed when
dcheng
2016/09/13 01:04:48
This would be nice to have documented somewhere.
(
kylechar
2016/09/13 14:09:53
T'll add comments on platform_screen_ and input_de
| |
| 216 | |
| 215 #if defined(USE_OZONE) | 217 #if defined(USE_OZONE) |
| 216 ui::OzonePlatform::GetInstance()->AddInterfaces(registry); | 218 ui::OzonePlatform::GetInstance()->AddInterfaces(registry); |
| 217 #endif | 219 #endif |
| 218 | 220 |
| 219 return true; | 221 return true; |
| 220 } | 222 } |
| 221 | 223 |
| 222 void Service::OnFirstDisplayReady() { | 224 void Service::OnFirstDisplayReady() { |
| 223 PendingRequests requests; | 225 PendingRequests requests; |
| 224 requests.swap(pending_requests_); | 226 requests.swap(pending_requests_); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 349 | 351 |
| 350 void Service::Create(const shell::Identity& remote_identity, | 352 void Service::Create(const shell::Identity& remote_identity, |
| 351 mojom::WindowServerTestRequest request) { | 353 mojom::WindowServerTestRequest request) { |
| 352 if (!test_config_) | 354 if (!test_config_) |
| 353 return; | 355 return; |
| 354 new ws::WindowServerTestImpl(window_server_.get(), std::move(request)); | 356 new ws::WindowServerTestImpl(window_server_.get(), std::move(request)); |
| 355 } | 357 } |
| 356 | 358 |
| 357 | 359 |
| 358 } // namespace ui | 360 } // namespace ui |
| OLD | NEW |