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_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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // Sets up the device id in the list |devices| as pointer devices. | 92 // Sets up the device id in the list |devices| as pointer devices. |
93 // This function is only for test purpose, and it does not query from | 93 // This function is only for test purpose, and it does not query from |
94 // X server. | 94 // X server. |
95 void SetPointerDeviceForTest(const std::vector<int>& devices); | 95 void SetPointerDeviceForTest(const std::vector<int>& devices); |
96 | 96 |
97 private: | 97 private: |
98 // Requirement for Singleton | 98 // Requirement for Singleton |
99 friend struct DefaultSingletonTraits<TouchFactory>; | 99 friend struct DefaultSingletonTraits<TouchFactory>; |
100 | 100 |
101 void CacheTouchscreenIds(int id); | 101 void CacheTouchscreenIds(Display* display, int id); |
102 | 102 |
103 // NOTE: To keep track of touch devices, we currently maintain a lookup table | 103 // NOTE: To keep track of touch devices, we currently maintain a lookup table |
104 // to quickly decide if a device is a touch device or not. We also maintain a | 104 // to quickly decide if a device is a touch device or not. We also maintain a |
105 // list of the touch devices. Ideally, there will be only one touch device, | 105 // list of the touch devices. Ideally, there will be only one touch device, |
106 // and instead of having the lookup table and the list, there will be a single | 106 // and instead of having the lookup table and the list, there will be a single |
107 // identifier for the touch device. This can be completed after enough testing | 107 // identifier for the touch device. This can be completed after enough testing |
108 // on real touch devices. | 108 // on real touch devices. |
109 | 109 |
110 static const int kMaxDeviceNum = 128; | 110 static const int kMaxDeviceNum = 128; |
111 | 111 |
(...skipping 21 matching lines...) Expand all Loading... |
133 int virtual_core_keyboard_device_; | 133 int virtual_core_keyboard_device_; |
134 | 134 |
135 SequentialIDGenerator id_generator_; | 135 SequentialIDGenerator id_generator_; |
136 | 136 |
137 DISALLOW_COPY_AND_ASSIGN(TouchFactory); | 137 DISALLOW_COPY_AND_ASSIGN(TouchFactory); |
138 }; | 138 }; |
139 | 139 |
140 } // namespace ui | 140 } // namespace ui |
141 | 141 |
142 #endif // UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_ | 142 #endif // UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_ |
OLD | NEW |