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

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

Issue 2897863004: Revert of chromeos: adds TouchDeviceServer and wires up in mushrome (Closed)
Patch Set: 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
24 // Listens to DeviceDataManager for updates on input-devices and forwards those 22 // Listens to DeviceDataManager for updates on input-devices and forwards those
25 // updates to any registered InputDeviceObserverMojo in other processes via 23 // updates to any registered InputDeviceObserverMojo in other processes via
26 // Mojo IPC. This runs in the mus-ws process. 24 // Mojo IPC. This runs in the mus-ws process.
27 class InputDeviceServer : public mojom::InputDeviceServer, 25 class InputDeviceServer : public mojom::InputDeviceServer,
28 public ui::InputDeviceEventObserver { 26 public ui::InputDeviceEventObserver {
29 public: 27 public:
30 InputDeviceServer(); 28 InputDeviceServer();
31 ~InputDeviceServer() override; 29 ~InputDeviceServer() override;
32 30
33 // Registers this instance as a local observer with DeviceDataManager. 31 // Registers this instance as a local observer with DeviceDataManager.
(...skipping 24 matching lines...) Expand all
58 void BindInputDeviceServerRequest( 56 void BindInputDeviceServerRequest(
59 const service_manager::BindSourceInfo& source_info, 57 const service_manager::BindSourceInfo& source_info,
60 mojom::InputDeviceServerRequest request); 58 mojom::InputDeviceServerRequest request);
61 59
62 mojo::BindingSet<mojom::InputDeviceServer> bindings_; 60 mojo::BindingSet<mojom::InputDeviceServer> bindings_;
63 mojo::InterfacePtrSet<mojom::InputDeviceObserverMojo> observers_; 61 mojo::InterfacePtrSet<mojom::InputDeviceObserverMojo> observers_;
64 62
65 // DeviceDataManager instance we are registered as an observer with. 63 // DeviceDataManager instance we are registered as an observer with.
66 ui::DeviceDataManager* manager_ = nullptr; 64 ui::DeviceDataManager* manager_ = nullptr;
67 65
68 #if defined(OS_CHROMEOS)
69 std::unique_ptr<TouchDeviceServer> touch_device_server_;
70 #endif
71
72 DISALLOW_COPY_AND_ASSIGN(InputDeviceServer); 66 DISALLOW_COPY_AND_ASSIGN(InputDeviceServer);
73 }; 67 };
74 68
75 } // namespace ui 69 } // namespace ui
76 70
77 #endif // SERVICES_UI_INPUT_DEVICES_INPUT_DEVICE_SERVER_H_ 71 #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