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

Side by Side Diff: services/ui/input_devices/input_device_server.h

Issue 2901563002: chromeos: adds TouchDeviceServer and wires up in mushrome (Closed)
Patch Set: no temporary Created 3 years, 7 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/input_devices/BUILD.gn ('k') | services/ui/input_devices/input_device_server.cc » ('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 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 #ifndef SERVICES_UI_INPUT_DEVICES_INPUT_DEVICE_SERVER_H_ 5 #ifndef SERVICES_UI_INPUT_DEVICES_INPUT_DEVICE_SERVER_H_
6 #define SERVICES_UI_INPUT_DEVICES_INPUT_DEVICE_SERVER_H_ 6 #define SERVICES_UI_INPUT_DEVICES_INPUT_DEVICE_SERVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/public/cpp/bindings/binding_set.h" 9 #include "mojo/public/cpp/bindings/binding_set.h"
10 #include "mojo/public/cpp/bindings/interface_ptr_set.h" 10 #include "mojo/public/cpp/bindings/interface_ptr_set.h"
11 #include "services/ui/public/interfaces/input_devices/input_device_server.mojom. h" 11 #include "services/ui/public/interfaces/input_devices/input_device_server.mojom. h"
12 #include "ui/events/devices/device_data_manager.h" 12 #include "ui/events/devices/device_data_manager.h"
13 #include "ui/events/devices/input_device_event_observer.h" 13 #include "ui/events/devices/input_device_event_observer.h"
14 14
15 namespace service_manager { 15 namespace service_manager {
16 class BinderRegistry; 16 class BinderRegistry;
17 struct BindSourceInfo; 17 struct BindSourceInfo;
18 } 18 }
19 19
20 namespace ui { 20 namespace ui {
21 21
22 class TouchDeviceServer;
23
22 // Listens to DeviceDataManager for updates on input-devices and forwards those 24 // Listens to DeviceDataManager for updates on input-devices and forwards those
23 // updates to any registered InputDeviceObserverMojo in other processes via 25 // updates to any registered InputDeviceObserverMojo in other processes via
24 // Mojo IPC. This runs in the mus-ws process. 26 // Mojo IPC. This runs in the mus-ws process.
25 class InputDeviceServer : public mojom::InputDeviceServer, 27 class InputDeviceServer : public mojom::InputDeviceServer,
26 public ui::InputDeviceEventObserver { 28 public ui::InputDeviceEventObserver {
27 public: 29 public:
28 InputDeviceServer(); 30 InputDeviceServer();
29 ~InputDeviceServer() override; 31 ~InputDeviceServer() override;
30 32
31 // Registers this instance as a local observer with DeviceDataManager. 33 // Registers this instance as a local observer with DeviceDataManager.
(...skipping 24 matching lines...) Expand all
56 void BindInputDeviceServerRequest( 58 void BindInputDeviceServerRequest(
57 const service_manager::BindSourceInfo& source_info, 59 const service_manager::BindSourceInfo& source_info,
58 mojom::InputDeviceServerRequest request); 60 mojom::InputDeviceServerRequest request);
59 61
60 mojo::BindingSet<mojom::InputDeviceServer> bindings_; 62 mojo::BindingSet<mojom::InputDeviceServer> bindings_;
61 mojo::InterfacePtrSet<mojom::InputDeviceObserverMojo> observers_; 63 mojo::InterfacePtrSet<mojom::InputDeviceObserverMojo> observers_;
62 64
63 // DeviceDataManager instance we are registered as an observer with. 65 // DeviceDataManager instance we are registered as an observer with.
64 ui::DeviceDataManager* manager_ = nullptr; 66 ui::DeviceDataManager* manager_ = nullptr;
65 67
68 #if defined(OS_CHROMEOS)
69 std::unique_ptr<TouchDeviceServer> touch_device_server_;
70 #endif
71
66 DISALLOW_COPY_AND_ASSIGN(InputDeviceServer); 72 DISALLOW_COPY_AND_ASSIGN(InputDeviceServer);
67 }; 73 };
68 74
69 } // namespace ui 75 } // namespace ui
70 76
71 #endif // SERVICES_UI_INPUT_DEVICES_INPUT_DEVICE_SERVER_H_ 77 #endif // SERVICES_UI_INPUT_DEVICES_INPUT_DEVICE_SERVER_H_
OLDNEW
« no previous file with comments | « services/ui/input_devices/BUILD.gn ('k') | services/ui/input_devices/input_device_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698