| 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_EVENT_FACTORY_EVDEV_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
| 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 namespace gfx { | 24 namespace gfx { |
| 25 class PointF; | 25 class PointF; |
| 26 } // namespace gfx | 26 } // namespace gfx |
| 27 | 27 |
| 28 namespace ui { | 28 namespace ui { |
| 29 | 29 |
| 30 class CursorDelegateEvdev; | 30 class CursorDelegateEvdev; |
| 31 class DeviceManager; | 31 class DeviceManager; |
| 32 class InputDeviceFactoryEvdev; | 32 class InputDeviceFactoryEvdev; |
| 33 class InputDeviceFactoryEvdevProxy; |
| 33 class SystemInputInjector; | 34 class SystemInputInjector; |
| 34 enum class DomCode; | 35 enum class DomCode; |
| 35 | 36 |
| 36 #if !defined(USE_EVDEV) | 37 #if !defined(USE_EVDEV) |
| 37 #error Missing dependency on ui/events/ozone:events_ozone_evdev | 38 #error Missing dependency on ui/events/ozone:events_ozone_evdev |
| 38 #endif | 39 #endif |
| 39 | 40 |
| 40 // Ozone events implementation for the Linux input subsystem ("evdev"). | 41 // Ozone events implementation for the Linux input subsystem ("evdev"). |
| 41 class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver, | 42 class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver, |
| 42 public PlatformEventSource { | 43 public PlatformEventSource { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 90 |
| 90 // Used to uniquely identify input devices. | 91 // Used to uniquely identify input devices. |
| 91 int last_device_id_; | 92 int last_device_id_; |
| 92 | 93 |
| 93 // Interface for scanning & monitoring input devices. | 94 // Interface for scanning & monitoring input devices. |
| 94 DeviceManager* device_manager_; // Not owned. | 95 DeviceManager* device_manager_; // Not owned. |
| 95 | 96 |
| 96 // Factory for per-device objects. | 97 // Factory for per-device objects. |
| 97 scoped_ptr<InputDeviceFactoryEvdev> input_device_factory_; | 98 scoped_ptr<InputDeviceFactoryEvdev> input_device_factory_; |
| 98 | 99 |
| 100 // Proxy for input device factory (manages device I/O objects). |
| 101 scoped_ptr<InputDeviceFactoryEvdevProxy> input_device_factory_proxy_; |
| 102 |
| 99 // Modifier key state (shift, ctrl, etc). | 103 // Modifier key state (shift, ctrl, etc). |
| 100 EventModifiersEvdev modifiers_; | 104 EventModifiersEvdev modifiers_; |
| 101 | 105 |
| 102 // Mouse button map. | 106 // Mouse button map. |
| 103 MouseButtonMapEvdev button_map_; | 107 MouseButtonMapEvdev button_map_; |
| 104 | 108 |
| 105 // Keyboard state. | 109 // Keyboard state. |
| 106 KeyboardEvdev keyboard_; | 110 KeyboardEvdev keyboard_; |
| 107 | 111 |
| 108 // Cursor movement. | 112 // Cursor movement. |
| 109 CursorDelegateEvdev* cursor_; | 113 CursorDelegateEvdev* cursor_; |
| 110 | 114 |
| 111 // Object for controlling input devices. | 115 // Object for controlling input devices. |
| 112 InputControllerEvdev input_controller_; | 116 InputControllerEvdev input_controller_; |
| 113 | 117 |
| 114 // Whether we've set up the device factory & done initial scan. | 118 // Whether we've set up the device factory & done initial scan. |
| 115 bool initialized_; | 119 bool initialized_; |
| 116 | 120 |
| 117 // Support weak pointers for attach & detach callbacks. | 121 // Support weak pointers for attach & detach callbacks. |
| 118 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; | 122 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; |
| 119 | 123 |
| 120 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); | 124 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); |
| 121 }; | 125 }; |
| 122 | 126 |
| 123 } // namespace ui | 127 } // namespace ui |
| 124 | 128 |
| 125 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 129 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
| OLD | NEW |