| 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_X_DEVICE_DATA_MANAGER_X11_H_ | 5 #ifndef UI_EVENTS_X_DEVICE_DATA_MANAGER_X11_H_ |
| 6 #define UI_EVENTS_X_DEVICE_DATA_MANAGER_X11_H_ | 6 #define UI_EVENTS_X_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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 234 |
| 235 // Disables and enables events from devices by device id. | 235 // Disables and enables events from devices by device id. |
| 236 void DisableDevice(unsigned int deviceid); | 236 void DisableDevice(unsigned int deviceid); |
| 237 void EnableDevice(unsigned int deviceid); | 237 void EnableDevice(unsigned int deviceid); |
| 238 | 238 |
| 239 // Returns true if |native_event| should be blocked. | 239 // Returns true if |native_event| should be blocked. |
| 240 bool IsEventBlocked(const base::NativeEvent& native_event); | 240 bool IsEventBlocked(const base::NativeEvent& native_event); |
| 241 | 241 |
| 242 protected: | 242 protected: |
| 243 // DeviceHotplugEventObserver: | 243 // DeviceHotplugEventObserver: |
| 244 virtual void OnKeyboardDevicesUpdated( | 244 void OnKeyboardDevicesUpdated( |
| 245 const std::vector<KeyboardDevice>& devices) override; | 245 const std::vector<KeyboardDevice>& devices) override; |
| 246 | 246 |
| 247 private: | 247 private: |
| 248 DeviceDataManagerX11(); | 248 DeviceDataManagerX11(); |
| 249 virtual ~DeviceDataManagerX11(); | 249 ~DeviceDataManagerX11() override; |
| 250 | 250 |
| 251 // Initialize the XInput related system information. | 251 // Initialize the XInput related system information. |
| 252 bool InitializeXInputInternal(); | 252 bool InitializeXInputInternal(); |
| 253 | 253 |
| 254 // Check if an XI event contains data of the specified type. | 254 // Check if an XI event contains data of the specified type. |
| 255 bool HasEventData(const XIDeviceEvent* xiev, const DataType type) const; | 255 bool HasEventData(const XIDeviceEvent* xiev, const DataType type) const; |
| 256 | 256 |
| 257 void InitializeValuatorsForTest(int deviceid, | 257 void InitializeValuatorsForTest(int deviceid, |
| 258 int start_valuator, | 258 int start_valuator, |
| 259 int end_valuator, | 259 int end_valuator, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 315 |
| 316 unsigned char button_map_[256]; | 316 unsigned char button_map_[256]; |
| 317 int button_map_count_; | 317 int button_map_count_; |
| 318 | 318 |
| 319 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); | 319 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); |
| 320 }; | 320 }; |
| 321 | 321 |
| 322 } // namespace ui | 322 } // namespace ui |
| 323 | 323 |
| 324 #endif // UI_EVENTS_X_DEVICE_DATA_MANAGER_X11_H_ | 324 #endif // UI_EVENTS_X_DEVICE_DATA_MANAGER_X11_H_ |
| OLD | NEW |