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_PLATFORM_X11_DEVICE_DATA_MANAGER_X11_H_ | 5 #ifndef UI_EVENTS_PLATFORM_X11_DEVICE_DATA_MANAGER_X11_H_ |
6 #define UI_EVENTS_PLATFORM_X11_DEVICE_DATA_MANAGER_X11_H_ | 6 #define UI_EVENTS_PLATFORM_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 220 matching lines...) Loading... |
231 | 231 |
232 // Disables and enables events from devices by device id. | 232 // Disables and enables events from devices by device id. |
233 void DisableDevice(unsigned int deviceid); | 233 void DisableDevice(unsigned int deviceid); |
234 void EnableDevice(unsigned int deviceid); | 234 void EnableDevice(unsigned int deviceid); |
235 | 235 |
236 // Returns true if |native_event| should be blocked. | 236 // Returns true if |native_event| should be blocked. |
237 bool IsEventBlocked(const base::NativeEvent& native_event); | 237 bool IsEventBlocked(const base::NativeEvent& native_event); |
238 | 238 |
239 private: | 239 private: |
240 DeviceDataManagerX11(); | 240 DeviceDataManagerX11(); |
241 virtual ~DeviceDataManagerX11(); | 241 ~DeviceDataManagerX11() override; |
242 | 242 |
243 // Initialize the XInput related system information. | 243 // Initialize the XInput related system information. |
244 bool InitializeXInputInternal(); | 244 bool InitializeXInputInternal(); |
245 | 245 |
246 // Check if an XI event contains data of the specified type. | 246 // Check if an XI event contains data of the specified type. |
247 bool HasEventData(const XIDeviceEvent* xiev, const DataType type) const; | 247 bool HasEventData(const XIDeviceEvent* xiev, const DataType type) const; |
248 | 248 |
249 void InitializeValuatorsForTest(int deviceid, | 249 void InitializeValuatorsForTest(int deviceid, |
250 int start_valuator, | 250 int start_valuator, |
251 int end_valuator, | 251 int end_valuator, |
(...skipping 51 matching lines...) Loading... |
303 | 303 |
304 unsigned char button_map_[256]; | 304 unsigned char button_map_[256]; |
305 int button_map_count_; | 305 int button_map_count_; |
306 | 306 |
307 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); | 307 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); |
308 }; | 308 }; |
309 | 309 |
310 } // namespace ui | 310 } // namespace ui |
311 | 311 |
312 #endif // UI_EVENTS_PLATFORM_X11_DEVICE_DATA_MANAGER_X11_H_ | 312 #endif // UI_EVENTS_PLATFORM_X11_DEVICE_DATA_MANAGER_X11_H_ |
OLD | NEW |