| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 #if !defined(OS_ANDROID) | 174 #if !defined(OS_ANDROID) |
| 175 event_source_ = ui::PlatformEventSource::CreateDefault(); | 175 event_source_ = ui::PlatformEventSource::CreateDefault(); |
| 176 #endif | 176 #endif |
| 177 | 177 |
| 178 // This needs to happen after DeviceDataManager has been constructed. That | 178 // This needs to happen after DeviceDataManager has been constructed. That |
| 179 // happens either during OzonePlatform or PlatformEventSource initialization, | 179 // happens either during OzonePlatform or PlatformEventSource initialization, |
| 180 // so keep this line below both of those. | 180 // so keep this line below both of those. |
| 181 input_device_server_.RegisterAsObserver(); | 181 input_device_server_.RegisterAsObserver(); |
| 182 | 182 |
| 183 // Gpu must be running before the PlatformScreen can be initialized. | 183 // Gpu must be running before the PlatformScreen can be initialized. |
| 184 window_server_.reset(new ws::WindowServer(this)); | 184 window_server_.reset(new ws::WindowServer(this, connector())); |
| 185 | 185 |
| 186 // DeviceDataManager must be initialized before TouchController. On non-Linux | 186 // DeviceDataManager must be initialized before TouchController. On non-Linux |
| 187 // platforms there is no DeviceDataManager so don't create touch controller. | 187 // platforms there is no DeviceDataManager so don't create touch controller. |
| 188 if (ui::DeviceDataManager::HasInstance()) | 188 if (ui::DeviceDataManager::HasInstance()) |
| 189 touch_controller_.reset( | 189 touch_controller_.reset( |
| 190 new ws::TouchController(window_server_->display_manager())); | 190 new ws::TouchController(window_server_->display_manager())); |
| 191 | 191 |
| 192 ime_server_.Init(connector()); | 192 ime_server_.Init(connector()); |
| 193 } | 193 } |
| 194 | 194 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 mojom::WindowServerTestRequest request) { | 356 mojom::WindowServerTestRequest request) { |
| 357 if (!test_config_) | 357 if (!test_config_) |
| 358 return; | 358 return; |
| 359 mojo::MakeStrongBinding( | 359 mojo::MakeStrongBinding( |
| 360 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()), | 360 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()), |
| 361 std::move(request)); | 361 std::move(request)); |
| 362 } | 362 } |
| 363 | 363 |
| 364 | 364 |
| 365 } // namespace ui | 365 } // namespace ui |
| OLD | NEW |