| 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_DEVICE_FACTORY_EVDEV_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ |
| 6 #define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // Policy for device enablement. | 83 // Policy for device enablement. |
| 84 bool IsDeviceEnabled(const EventConverterEvdev* converter); | 84 bool IsDeviceEnabled(const EventConverterEvdev* converter); |
| 85 | 85 |
| 86 // Update observers on device changes. | 86 // Update observers on device changes. |
| 87 void UpdateDirtyFlags(const EventConverterEvdev* converter); | 87 void UpdateDirtyFlags(const EventConverterEvdev* converter); |
| 88 void NotifyDevicesUpdated(); | 88 void NotifyDevicesUpdated(); |
| 89 void NotifyKeyboardsUpdated(); | 89 void NotifyKeyboardsUpdated(); |
| 90 void NotifyTouchscreensUpdated(); | 90 void NotifyTouchscreensUpdated(); |
| 91 void NotifyMouseDevicesUpdated(); | 91 void NotifyMouseDevicesUpdated(); |
| 92 void NotifyTouchpadDevicesUpdated(); | 92 void NotifyTouchpadDevicesUpdated(); |
| 93 void NotifyGamepadDevicesUpdated(); |
| 93 | 94 |
| 94 void SetIntPropertyForOneType(const EventDeviceType type, | 95 void SetIntPropertyForOneType(const EventDeviceType type, |
| 95 const std::string& name, | 96 const std::string& name, |
| 96 int value); | 97 int value); |
| 97 void SetBoolPropertyForOneType(const EventDeviceType type, | 98 void SetBoolPropertyForOneType(const EventDeviceType type, |
| 98 const std::string& name, | 99 const std::string& name, |
| 99 bool value); | 100 bool value); |
| 100 | 101 |
| 101 // Owned per-device event converters (by path). | 102 // Owned per-device event converters (by path). |
| 102 std::map<base::FilePath, std::unique_ptr<EventConverterEvdev>> converters_; | 103 std::map<base::FilePath, std::unique_ptr<EventConverterEvdev>> converters_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 114 | 115 |
| 115 // Dispatcher for events. | 116 // Dispatcher for events. |
| 116 std::unique_ptr<DeviceEventDispatcherEvdev> dispatcher_; | 117 std::unique_ptr<DeviceEventDispatcherEvdev> dispatcher_; |
| 117 | 118 |
| 118 // Number of pending device additions & device classes. | 119 // Number of pending device additions & device classes. |
| 119 int pending_device_changes_ = 0; | 120 int pending_device_changes_ = 0; |
| 120 bool touchscreen_list_dirty_ = true; | 121 bool touchscreen_list_dirty_ = true; |
| 121 bool keyboard_list_dirty_ = true; | 122 bool keyboard_list_dirty_ = true; |
| 122 bool mouse_list_dirty_ = true; | 123 bool mouse_list_dirty_ = true; |
| 123 bool touchpad_list_dirty_ = true; | 124 bool touchpad_list_dirty_ = true; |
| 125 bool gamepad_list_dirty_ = true; |
| 124 | 126 |
| 125 // Whether we have a list of devices that were present at startup. | 127 // Whether we have a list of devices that were present at startup. |
| 126 bool startup_devices_enumerated_ = false; | 128 bool startup_devices_enumerated_ = false; |
| 127 | 129 |
| 128 // Whether devices that were present at startup are open. | 130 // Whether devices that were present at startup are open. |
| 129 bool startup_devices_opened_ = false; | 131 bool startup_devices_opened_ = false; |
| 130 | 132 |
| 131 // LEDs. | 133 // LEDs. |
| 132 bool caps_lock_led_enabled_ = false; | 134 bool caps_lock_led_enabled_ = false; |
| 133 | 135 |
| 134 // Whether touch palm suppression is enabled. | 136 // Whether touch palm suppression is enabled. |
| 135 bool palm_suppression_enabled_ = false; | 137 bool palm_suppression_enabled_ = false; |
| 136 | 138 |
| 137 // Device settings. These primarily affect libgestures behavior. | 139 // Device settings. These primarily affect libgestures behavior. |
| 138 InputDeviceSettingsEvdev input_device_settings_; | 140 InputDeviceSettingsEvdev input_device_settings_; |
| 139 | 141 |
| 140 // Support weak pointers for attach & detach callbacks. | 142 // Support weak pointers for attach & detach callbacks. |
| 141 base::WeakPtrFactory<InputDeviceFactoryEvdev> weak_ptr_factory_; | 143 base::WeakPtrFactory<InputDeviceFactoryEvdev> weak_ptr_factory_; |
| 142 | 144 |
| 143 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdev); | 145 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdev); |
| 144 }; | 146 }; |
| 145 | 147 |
| 146 } // namespace ui | 148 } // namespace ui |
| 147 | 149 |
| 148 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ | 150 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ |
| OLD | NEW |