OLD | NEW |
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/input_devices/input_device_server.h" | 5 #include "services/ui/input_devices/input_device_server.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "mojo/public/cpp/bindings/array.h" | 10 #include "mojo/public/cpp/bindings/array.h" |
11 #include "services/shell/public/cpp/interface_registry.h" | 11 #include "services/service_manager/public/cpp/interface_registry.h" |
12 #include "ui/events/devices/input_device.h" | 12 #include "ui/events/devices/input_device.h" |
13 #include "ui/events/devices/touchscreen_device.h" | 13 #include "ui/events/devices/touchscreen_device.h" |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 InputDeviceServer::InputDeviceServer() {} | 17 InputDeviceServer::InputDeviceServer() {} |
18 | 18 |
19 InputDeviceServer::~InputDeviceServer() { | 19 InputDeviceServer::~InputDeviceServer() { |
20 if (manager_ && ui::DeviceDataManager::HasInstance()) { | 20 if (manager_ && ui::DeviceDataManager::HasInstance()) { |
21 manager_->RemoveObserver(this); | 21 manager_->RemoveObserver(this); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 manager_->GetKeyboardDevices(), manager_->GetTouchscreenDevices(), | 108 manager_->GetKeyboardDevices(), manager_->GetTouchscreenDevices(), |
109 manager_->GetMouseDevices(), manager_->GetTouchpadDevices()); | 109 manager_->GetMouseDevices(), manager_->GetTouchpadDevices()); |
110 } | 110 } |
111 | 111 |
112 void InputDeviceServer::Create(const shell::Identity& remote_identity, | 112 void InputDeviceServer::Create(const shell::Identity& remote_identity, |
113 mojom::InputDeviceServerRequest request) { | 113 mojom::InputDeviceServerRequest request) { |
114 bindings_.AddBinding(this, std::move(request)); | 114 bindings_.AddBinding(this, std::move(request)); |
115 } | 115 } |
116 | 116 |
117 } // namespace ui | 117 } // namespace ui |
OLD | NEW |