| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TOUCH_FACTORY_X11_H_ | 5 #ifndef UI_EVENTS_X_TOUCH_FACTORY_X11_H_ |
| 6 #define UI_EVENTS_X_TOUCH_FACTORY_X11_H_ | 6 #define UI_EVENTS_X_TOUCH_FACTORY_X11_H_ |
| 7 | 7 |
| 8 #include <bitset> | 8 #include <bitset> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 static const int kMaxDeviceNum = 128; | 115 static const int kMaxDeviceNum = 128; |
| 116 | 116 |
| 117 // A quick lookup table for determining if events from the pointer device | 117 // A quick lookup table for determining if events from the pointer device |
| 118 // should be processed. | 118 // should be processed. |
| 119 std::bitset<kMaxDeviceNum> pointer_device_lookup_; | 119 std::bitset<kMaxDeviceNum> pointer_device_lookup_; |
| 120 | 120 |
| 121 // A quick lookup table for determining if a device is a touch device. | 121 // A quick lookup table for determining if a device is a touch device. |
| 122 std::bitset<kMaxDeviceNum> touch_device_lookup_; | 122 std::bitset<kMaxDeviceNum> touch_device_lookup_; |
| 123 | 123 |
| 124 // Indicates whether a touch device is currently available or not. | |
| 125 bool touch_device_available_; | |
| 126 | |
| 127 // Indicates whether touch events are explicitly disabled. | 124 // Indicates whether touch events are explicitly disabled. |
| 128 bool touch_events_disabled_; | 125 bool touch_events_disabled_; |
| 129 | 126 |
| 130 // The list of touch devices. For testing/debugging purposes, a single-pointer | 127 // The list of touch devices. For testing/debugging purposes, a single-pointer |
| 131 // device (mouse or touch screen without sufficient X/driver support for MT) | 128 // device (mouse or touch screen without sufficient X/driver support for MT) |
| 132 // can sometimes be treated as a touch device. The key in the map represents | 129 // can sometimes be treated as a touch device. The key in the map represents |
| 133 // the device id, and the value represents if the device is multi-touch | 130 // the device id, and the value represents if the device is multi-touch |
| 134 // capable. | 131 // capable. |
| 135 std::map<int, bool> touch_device_list_; | 132 std::map<int, bool> touch_device_list_; |
| 136 | 133 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 151 int virtual_core_keyboard_device_; | 148 int virtual_core_keyboard_device_; |
| 152 | 149 |
| 153 SequentialIDGenerator id_generator_; | 150 SequentialIDGenerator id_generator_; |
| 154 | 151 |
| 155 DISALLOW_COPY_AND_ASSIGN(TouchFactory); | 152 DISALLOW_COPY_AND_ASSIGN(TouchFactory); |
| 156 }; | 153 }; |
| 157 | 154 |
| 158 } // namespace ui | 155 } // namespace ui |
| 159 | 156 |
| 160 #endif // UI_EVENTS_X_TOUCH_FACTORY_X11_H_ | 157 #endif // UI_EVENTS_X_TOUCH_FACTORY_X11_H_ |
| OLD | NEW |