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

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

Issue 845413002: touch: Change how touch-screen capability is processed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 months 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
« no previous file with comments | « ui/events/devices/touchscreen_device.cc ('k') | ui/events/devices/x11/touch_factory_x11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void ReleaseSlotForTrackingID(uint32 tracking_id); 75 void ReleaseSlotForTrackingID(uint32 tracking_id);
76 76
77 // Whether any touch device is currently present and enabled. 77 // Whether any touch device is currently present and enabled.
78 bool IsTouchDevicePresent(); 78 bool IsTouchDevicePresent();
79 79
80 // Pairs of <vendor id, product id> of external touch screens. 80 // Pairs of <vendor id, product id> of external touch screens.
81 const std::set<std::pair<int, int> >& GetTouchscreenIds() const { 81 const std::set<std::pair<int, int> >& GetTouchscreenIds() const {
82 return touchscreen_ids_; 82 return touchscreen_ids_;
83 } 83 }
84 84
85 // Return maximum simultaneous touch points supported by device.
86 int GetMaxTouchPoints() const;
87
88 // Resets the TouchFactory singleton. 85 // Resets the TouchFactory singleton.
89 void ResetForTest(); 86 void ResetForTest();
90 87
91 // Sets up the device id in the list |devices| as multi-touch capable 88 // Sets up the device id in the list |devices| as multi-touch capable
92 // devices and enables touch events processing. This function is only 89 // devices and enables touch events processing. This function is only
93 // for test purpose, and it does not query from X server. 90 // for test purpose, and it does not query from X server.
94 void SetTouchDeviceForTest(const std::vector<unsigned int>& devices); 91 void SetTouchDeviceForTest(const std::vector<unsigned int>& devices);
95 92
96 // Sets up the device id in the list |devices| as pointer devices. 93 // Sets up the device id in the list |devices| as pointer devices.
97 // This function is only for test purpose, and it does not query from 94 // This function is only for test purpose, and it does not query from
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // capable. 127 // capable.
131 std::map<int, bool> touch_device_list_; 128 std::map<int, bool> touch_device_list_;
132 129
133 // Touch screen <vid, pid>s. 130 // Touch screen <vid, pid>s.
134 std::set<std::pair<int, int> > touchscreen_ids_; 131 std::set<std::pair<int, int> > touchscreen_ids_;
135 132
136 // Maps from a tracking id to the number of times |ReleaseSlotForTrackingID| 133 // Maps from a tracking id to the number of times |ReleaseSlotForTrackingID|
137 // must be called before the tracking id is released. 134 // must be called before the tracking id is released.
138 std::map<uint32, int> tracking_id_refcounts_; 135 std::map<uint32, int> tracking_id_refcounts_;
139 136
140 // Maximum simultaneous touch points supported by device. In the case of
141 // devices with multiple digitizers (e.g. multiple touchscreens), the value
142 // is the maximum of the set of maximum supported contacts by each individual
143 // digitizer.
144 int max_touch_points_;
145
146 // Device ID of the virtual core keyboard. 137 // Device ID of the virtual core keyboard.
147 int virtual_core_keyboard_device_; 138 int virtual_core_keyboard_device_;
148 139
149 SequentialIDGenerator id_generator_; 140 SequentialIDGenerator id_generator_;
150 141
151 DISALLOW_COPY_AND_ASSIGN(TouchFactory); 142 DISALLOW_COPY_AND_ASSIGN(TouchFactory);
152 }; 143 };
153 144
154 } // namespace ui 145 } // namespace ui
155 146
156 #endif // UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_ 147 #endif // UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_
OLDNEW
« no previous file with comments | « ui/events/devices/touchscreen_device.cc ('k') | ui/events/devices/x11/touch_factory_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698