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 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_ |
6 #define UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" | 11 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" |
12 #include "ui/ozone/public/input_controller.h" | 12 #include "ui/ozone/public/input_controller.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 class InputDeviceFactoryEvdev; | 16 class InputDeviceFactoryProxyEvdev; |
17 class KeyboardEvdev; | 17 class KeyboardEvdev; |
18 class MouseButtonMapEvdev; | 18 class MouseButtonMapEvdev; |
19 | 19 |
20 // Ozone InputController implementation for the Linux input subsystem ("evdev"). | 20 // Ozone InputController implementation for the Linux input subsystem ("evdev"). |
21 class EVENTS_OZONE_EVDEV_EXPORT InputControllerEvdev : public InputController { | 21 class EVENTS_OZONE_EVDEV_EXPORT InputControllerEvdev : public InputController { |
22 public: | 22 public: |
23 InputControllerEvdev(KeyboardEvdev* keyboard, | 23 InputControllerEvdev(KeyboardEvdev* keyboard, |
24 MouseButtonMapEvdev* button_map); | 24 MouseButtonMapEvdev* button_map); |
25 ~InputControllerEvdev() override; | 25 ~InputControllerEvdev() override; |
26 | 26 |
27 // Initialize device factory. This would be in the constructor if it was | 27 // Initialize device factory. This would be in the constructor if it was |
28 // built early enough for that to be possible. | 28 // built early enough for that to be possible. |
29 void SetInputDeviceFactory(InputDeviceFactoryEvdev* input_device_factory); | 29 void SetInputDeviceFactory( |
| 30 InputDeviceFactoryProxyEvdev* input_device_factory); |
30 | 31 |
31 void SetHasMouse(bool has_mouse); | 32 void SetHasMouse(bool has_mouse); |
32 void SetHasTouchpad(bool has_touchpad); | 33 void SetHasTouchpad(bool has_touchpad); |
33 | 34 |
34 // InputController: | 35 // InputController: |
35 bool HasMouse() override; | 36 bool HasMouse() override; |
36 bool HasTouchpad() override; | 37 bool HasTouchpad() override; |
37 bool IsCapsLockEnabled() override; | 38 bool IsCapsLockEnabled() override; |
38 void SetCapsLockEnabled(bool enabled) override; | 39 void SetCapsLockEnabled(bool enabled) override; |
39 void SetNumLockEnabled(bool enabled) override; | 40 void SetNumLockEnabled(bool enabled) override; |
(...skipping 12 matching lines...) Expand all Loading... |
52 void SetPrimaryButtonRight(bool right) override; | 53 void SetPrimaryButtonRight(bool right) override; |
53 void SetTapToClickPaused(bool state) override; | 54 void SetTapToClickPaused(bool state) override; |
54 void DisableInternalTouchpad() override; | 55 void DisableInternalTouchpad() override; |
55 void EnableInternalTouchpad() override; | 56 void EnableInternalTouchpad() override; |
56 void DisableInternalKeyboardExceptKeys( | 57 void DisableInternalKeyboardExceptKeys( |
57 scoped_ptr<std::set<DomCode>> excepted_keys) override; | 58 scoped_ptr<std::set<DomCode>> excepted_keys) override; |
58 void EnableInternalKeyboard() override; | 59 void EnableInternalKeyboard() override; |
59 | 60 |
60 private: | 61 private: |
61 // Factory for devices. Needed to update device config. | 62 // Factory for devices. Needed to update device config. |
62 InputDeviceFactoryEvdev* input_device_factory_; | 63 InputDeviceFactoryProxyEvdev* input_device_factory_; |
63 | 64 |
64 // Keyboard state. | 65 // Keyboard state. |
65 KeyboardEvdev* keyboard_; | 66 KeyboardEvdev* keyboard_; |
66 | 67 |
67 // Mouse button map. | 68 // Mouse button map. |
68 MouseButtonMapEvdev* button_map_; | 69 MouseButtonMapEvdev* button_map_; |
69 | 70 |
70 // Device presence. | 71 // Device presence. |
71 bool has_mouse_; | 72 bool has_mouse_; |
72 bool has_touchpad_; | 73 bool has_touchpad_; |
73 | 74 |
74 DISALLOW_COPY_AND_ASSIGN(InputControllerEvdev); | 75 DISALLOW_COPY_AND_ASSIGN(InputControllerEvdev); |
75 }; | 76 }; |
76 | 77 |
77 } // namespace ui | 78 } // namespace ui |
78 | 79 |
79 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_ | 80 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_ |
OLD | NEW |