OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // to have safe default values for testing. | 217 // to have safe default values for testing. |
218 void SetDeviceListForTest(const std::vector<unsigned int>& touchscreen, | 218 void SetDeviceListForTest(const std::vector<unsigned int>& touchscreen, |
219 const std::vector<unsigned int>& cmt_devices); | 219 const std::vector<unsigned int>& cmt_devices); |
220 | 220 |
221 void SetValuatorDataForTest(XIDeviceEvent* xievent, | 221 void SetValuatorDataForTest(XIDeviceEvent* xievent, |
222 DataType type, | 222 DataType type, |
223 double value); | 223 double value); |
224 | 224 |
225 bool TouchEventNeedsCalibrate(int touch_device_id) const; | 225 bool TouchEventNeedsCalibrate(int touch_device_id) const; |
226 | 226 |
| 227 // DeviceDataManager overrides: |
| 228 virtual std::vector<TouchscreenDevice> GetTouchscreenDevices() OVERRIDE; |
| 229 |
227 private: | 230 private: |
228 // Initialize the XInput related system information. | 231 // Initialize the XInput related system information. |
229 bool InitializeXInputInternal(); | 232 bool InitializeXInputInternal(); |
230 | 233 |
231 // Check if an XI event contains data of the specified type. | 234 // Check if an XI event contains data of the specified type. |
232 bool HasEventData(const XIDeviceEvent* xiev, const DataType type) const; | 235 bool HasEventData(const XIDeviceEvent* xiev, const DataType type) const; |
233 | 236 |
234 void InitializeValuatorsForTest(int deviceid, | 237 void InitializeValuatorsForTest(int deviceid, |
235 int start_valuator, | 238 int start_valuator, |
236 int end_valuator, | 239 int end_valuator, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 284 |
282 unsigned char button_map_[256]; | 285 unsigned char button_map_[256]; |
283 int button_map_count_; | 286 int button_map_count_; |
284 | 287 |
285 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); | 288 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); |
286 }; | 289 }; |
287 | 290 |
288 } // namespace ui | 291 } // namespace ui |
289 | 292 |
290 #endif // UI_EVENTS_X_DEVICE_DATA_MANAGER_X11_H_ | 293 #endif // UI_EVENTS_X_DEVICE_DATA_MANAGER_X11_H_ |
OLD | NEW |