| 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 #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" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 void AddInterface(service_manager::InterfaceRegistry* registry); | 42 void AddInterface(service_manager::InterfaceRegistry* registry); |
| 43 | 43 |
| 44 // mojom::InputDeviceServer: | 44 // mojom::InputDeviceServer: |
| 45 void AddObserver(mojom::InputDeviceObserverMojoPtr observer) override; | 45 void AddObserver(mojom::InputDeviceObserverMojoPtr observer) override; |
| 46 | 46 |
| 47 // ui::InputDeviceEventObserver: | 47 // ui::InputDeviceEventObserver: |
| 48 void OnKeyboardDeviceConfigurationChanged() override; | 48 void OnKeyboardDeviceConfigurationChanged() override; |
| 49 void OnTouchscreenDeviceConfigurationChanged() override; | 49 void OnTouchscreenDeviceConfigurationChanged() override; |
| 50 void OnMouseDeviceConfigurationChanged() override; | 50 void OnMouseDeviceConfigurationChanged() override; |
| 51 void OnTouchpadDeviceConfigurationChanged() override; | 51 void OnTouchpadDeviceConfigurationChanged() override; |
| 52 void OnGamepadDeviceConfigurationChanged() override; |
| 52 void OnDeviceListsComplete() override; | 53 void OnDeviceListsComplete() override; |
| 53 void OnStylusStateChanged(StylusState state) override; | 54 void OnStylusStateChanged(StylusState state) override; |
| 54 | 55 |
| 55 private: | 56 private: |
| 56 // Sends the current state of all input-devices to an observer. | 57 // Sends the current state of all input-devices to an observer. |
| 57 void SendDeviceListsComplete(mojom::InputDeviceObserverMojo* observer); | 58 void SendDeviceListsComplete(mojom::InputDeviceObserverMojo* observer); |
| 58 | 59 |
| 59 // mojo::InterfaceFactory<mojom::InputDeviceServer>: | 60 // mojo::InterfaceFactory<mojom::InputDeviceServer>: |
| 60 void Create(const service_manager::Identity& remote_identity, | 61 void Create(const service_manager::Identity& remote_identity, |
| 61 mojom::InputDeviceServerRequest request) override; | 62 mojom::InputDeviceServerRequest request) override; |
| 62 | 63 |
| 63 mojo::BindingSet<mojom::InputDeviceServer> bindings_; | 64 mojo::BindingSet<mojom::InputDeviceServer> bindings_; |
| 64 mojo::InterfacePtrSet<mojom::InputDeviceObserverMojo> observers_; | 65 mojo::InterfacePtrSet<mojom::InputDeviceObserverMojo> observers_; |
| 65 | 66 |
| 66 // DeviceDataManager instance we are registered as an observer with. | 67 // DeviceDataManager instance we are registered as an observer with. |
| 67 ui::DeviceDataManager* manager_ = nullptr; | 68 ui::DeviceDataManager* manager_ = nullptr; |
| 68 | 69 |
| 69 DISALLOW_COPY_AND_ASSIGN(InputDeviceServer); | 70 DISALLOW_COPY_AND_ASSIGN(InputDeviceServer); |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 } // namespace ui | 73 } // namespace ui |
| 73 | 74 |
| 74 #endif // SERVICES_UI_INPUT_DEVICES_INPUT_DEVICE_SERVER_H_ | 75 #endif // SERVICES_UI_INPUT_DEVICES_INPUT_DEVICE_SERVER_H_ |
| OLD | NEW |