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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 void SetCapsLockLed(bool enabled); | 61 void SetCapsLockLed(bool enabled); |
62 | 62 |
63 // Bits from InputController that have to be answered on IO. | 63 // Bits from InputController that have to be answered on IO. |
64 void UpdateInputDeviceSettings(const InputDeviceSettingsEvdev& settings); | 64 void UpdateInputDeviceSettings(const InputDeviceSettingsEvdev& settings); |
65 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply); | 65 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply); |
66 void GetTouchEventLog(const base::FilePath& out_dir, | 66 void GetTouchEventLog(const base::FilePath& out_dir, |
67 const GetTouchEventLogReply& reply); | 67 const GetTouchEventLogReply& reply); |
68 | 68 |
69 base::WeakPtr<InputDeviceFactoryEvdev> GetWeakPtr(); | 69 base::WeakPtr<InputDeviceFactoryEvdev> GetWeakPtr(); |
70 | 70 |
| 71 void EnablePalmSuppression(bool enabled); |
| 72 |
71 private: | 73 private: |
72 // Open device at path & starting processing events (on UI thread). | 74 // Open device at path & starting processing events (on UI thread). |
73 void AttachInputDevice(std::unique_ptr<EventConverterEvdev> converter); | 75 void AttachInputDevice(std::unique_ptr<EventConverterEvdev> converter); |
74 | 76 |
75 // Close device at path (on UI thread). | 77 // Close device at path (on UI thread). |
76 void DetachInputDevice(const base::FilePath& file_path); | 78 void DetachInputDevice(const base::FilePath& file_path); |
77 | 79 |
78 // Sync input_device_settings_ to attached devices. | 80 // Sync input_device_settings_ to attached devices. |
79 void ApplyInputDeviceSettings(); | 81 void ApplyInputDeviceSettings(); |
80 void ApplyCapsLockLed(); | 82 void ApplyCapsLockLed(); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 125 |
124 // Whether we have a list of devices that were present at startup. | 126 // Whether we have a list of devices that were present at startup. |
125 bool startup_devices_enumerated_ = false; | 127 bool startup_devices_enumerated_ = false; |
126 | 128 |
127 // Whether devices that were present at startup are open. | 129 // Whether devices that were present at startup are open. |
128 bool startup_devices_opened_ = false; | 130 bool startup_devices_opened_ = false; |
129 | 131 |
130 // LEDs. | 132 // LEDs. |
131 bool caps_lock_led_enabled_ = false; | 133 bool caps_lock_led_enabled_ = false; |
132 | 134 |
| 135 // Whether touch palm suppression is enabled. |
| 136 bool palm_suppression_enabled_ = false; |
| 137 |
133 // Device settings. These primarily affect libgestures behavior. | 138 // Device settings. These primarily affect libgestures behavior. |
134 InputDeviceSettingsEvdev input_device_settings_; | 139 InputDeviceSettingsEvdev input_device_settings_; |
135 | 140 |
136 // Support weak pointers for attach & detach callbacks. | 141 // Support weak pointers for attach & detach callbacks. |
137 base::WeakPtrFactory<InputDeviceFactoryEvdev> weak_ptr_factory_; | 142 base::WeakPtrFactory<InputDeviceFactoryEvdev> weak_ptr_factory_; |
138 | 143 |
139 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdev); | 144 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdev); |
140 }; | 145 }; |
141 | 146 |
142 } // namespace ui | 147 } // namespace ui |
143 | 148 |
144 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ | 149 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ |
OLD | NEW |