Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: ui/events/devices/x11/touch_factory_x11.h

Issue 1412623006: Developer Feature: Add Debug Accelerators to Toggle Touchscreen/Touchpad On or Off (CrOS) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_DEVICES_X11_TOUCH_FACTORY_X11_H_ 5 #ifndef UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_
6 #define UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_ 6 #define UI_EVENTS_DEVICES_X11_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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 static const int kMaxDeviceNum = 128; 113 static const int kMaxDeviceNum = 128;
114 114
115 // A quick lookup table for determining if events from the pointer device 115 // A quick lookup table for determining if events from the pointer device
116 // should be processed. 116 // should be processed.
117 std::bitset<kMaxDeviceNum> pointer_device_lookup_; 117 std::bitset<kMaxDeviceNum> pointer_device_lookup_;
118 118
119 // A quick lookup table for determining if a device is a touch device. 119 // A quick lookup table for determining if a device is a touch device.
120 std::bitset<kMaxDeviceNum> touch_device_lookup_; 120 std::bitset<kMaxDeviceNum> touch_device_lookup_;
121 121
122 // Indicates whether touch events are explicitly disabled.
123 bool touch_events_disabled_;
124
125 // The list of touch devices. For testing/debugging purposes, a single-pointer 122 // The list of touch devices. For testing/debugging purposes, a single-pointer
126 // device (mouse or touch screen without sufficient X/driver support for MT) 123 // device (mouse or touch screen without sufficient X/driver support for MT)
127 // can sometimes be treated as a touch device. The key in the map represents 124 // can sometimes be treated as a touch device. The key in the map represents
128 // the device id, and the value represents if the device is multi-touch 125 // the device id, and the value represents if the device is multi-touch
129 // capable. 126 // capable.
130 std::map<int, bool> touch_device_list_; 127 std::map<int, bool> touch_device_list_;
131 128
132 // Touch screen <vid, pid>s. 129 // Touch screen <vid, pid>s.
133 std::set<std::pair<int, int> > touchscreen_ids_; 130 std::set<std::pair<int, int> > touchscreen_ids_;
134 131
135 // Device ID of the virtual core keyboard. 132 // Device ID of the virtual core keyboard.
136 int virtual_core_keyboard_device_; 133 int virtual_core_keyboard_device_;
137 134
138 SequentialIDGenerator id_generator_; 135 SequentialIDGenerator id_generator_;
139 136
140 // Associate each device ID with its master device ID. 137 // Associate each device ID with its master device ID.
141 std::map<int, int> device_master_id_list_; 138 std::map<int, int> device_master_id_list_;
142 139
143 DISALLOW_COPY_AND_ASSIGN(TouchFactory); 140 DISALLOW_COPY_AND_ASSIGN(TouchFactory);
144 }; 141 };
145 142
146 } // namespace ui 143 } // namespace ui
147 144
148 #endif // UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_ 145 #endif // UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698