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_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_ | 5 #ifndef UI_EVENTS_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_ |
6 #define UI_EVENTS_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_ | 6 #define UI_EVENTS_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_ |
7 | 7 |
8 // Generically-named #defines from Xlib is conflicting with symbols in GTest. | 8 // Generically-named #defines from Xlib is conflicting with symbols in GTest. |
9 // So many tests .cc file #undef Bool before including device_data_manager.h, | 9 // So many tests .cc file #undef Bool before including device_data_manager.h, |
10 // which makes Bool unrecognized in XInput2.h. | 10 // which makes Bool unrecognized in XInput2.h. |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 bool TouchEventNeedsCalibrate(int touch_device_id) const; | 233 bool TouchEventNeedsCalibrate(int touch_device_id) const; |
234 | 234 |
235 // Sets the keys which are still allowed on a disabled keyboard device. | 235 // Sets the keys which are still allowed on a disabled keyboard device. |
236 void SetDisabledKeyboardAllowedKeys( | 236 void SetDisabledKeyboardAllowedKeys( |
237 scoped_ptr<std::set<KeyboardCode> > excepted_keys); | 237 scoped_ptr<std::set<KeyboardCode> > excepted_keys); |
238 | 238 |
239 // Disables and enables events from devices by device id. | 239 // Disables and enables events from devices by device id. |
240 void DisableDevice(int deviceid); | 240 void DisableDevice(int deviceid); |
241 void EnableDevice(int deviceid); | 241 void EnableDevice(int deviceid); |
242 | 242 |
| 243 bool IsDeviceEnabled(int device_id) const; |
| 244 |
243 // Returns true if |native_event| should be blocked. | 245 // Returns true if |native_event| should be blocked. |
244 bool IsEventBlocked(const base::NativeEvent& native_event); | 246 bool IsEventBlocked(const base::NativeEvent& native_event); |
245 | 247 |
246 const std::vector<int>& master_pointers() const { | 248 const std::vector<int>& master_pointers() const { |
247 return master_pointers_; | 249 return master_pointers_; |
248 } | 250 } |
249 | 251 |
250 protected: | 252 protected: |
251 // DeviceHotplugEventObserver: | 253 // DeviceHotplugEventObserver: |
252 void OnKeyboardDevicesUpdated( | 254 void OnKeyboardDevicesUpdated( |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 325 |
324 unsigned char button_map_[256]; | 326 unsigned char button_map_[256]; |
325 int button_map_count_; | 327 int button_map_count_; |
326 | 328 |
327 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); | 329 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); |
328 }; | 330 }; |
329 | 331 |
330 } // namespace ui | 332 } // namespace ui |
331 | 333 |
332 #endif // UI_EVENTS_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_ | 334 #endif // UI_EVENTS_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_ |
OLD | NEW |