Chromium Code Reviews| Index: ui/events/x/touch_factory_x11.h |
| diff --git a/ui/events/x/touch_factory_x11.h b/ui/events/x/touch_factory_x11.h |
| index ed62c6d247f59ec6cefcd76b775c1e8623ad686d..6dfe586c01c58f3fb4c3f284527b05a73c62df51 100644 |
| --- a/ui/events/x/touch_factory_x11.h |
| +++ b/ui/events/x/touch_factory_x11.h |
| @@ -7,6 +7,7 @@ |
| #include <bitset> |
| #include <map> |
| +#include <set> |
| #include <vector> |
| #include "base/timer/timer.h" |
| @@ -72,6 +73,10 @@ class EVENTS_BASE_EXPORT TouchFactory { |
| // Whether any touch device is currently present and enabled. |
| bool IsTouchDevicePresent(); |
| + const std::set<std::pair<int, int> > GetTouchscreenIds() const { |
|
sadrul
2013/12/12 19:28:59
&
tdresser
2013/12/12 21:24:22
Done.
|
| + return touchscreen_ids_; |
| + } |
| + |
| // Return maximum simultaneous touch points supported by device. |
| int GetMaxTouchPoints() const; |
| @@ -89,6 +94,8 @@ class EVENTS_BASE_EXPORT TouchFactory { |
| // Requirement for Singleton |
| friend struct DefaultSingletonTraits<TouchFactory>; |
| + void CacheTouchscreenIds(Display* display, int id); |
| + |
| // NOTE: To keep track of touch devices, we currently maintain a lookup table |
| // to quickly decide if a device is a touch device or not. We also maintain a |
| // list of the touch devices. Ideally, there will be only one touch device, |
| @@ -97,6 +104,7 @@ class EVENTS_BASE_EXPORT TouchFactory { |
| // on real touch devices. |
| static const int kMaxDeviceNum = 128; |
| + static const char* kDeviceProductIdString; |
| // A quick lookup table for determining if events from the pointer device |
| // should be processed. |
| @@ -118,6 +126,9 @@ class EVENTS_BASE_EXPORT TouchFactory { |
| // capable. |
| std::map<int, bool> touch_device_list_; |
| + // Touch screen <vid, pid>s. |
| + std::set<std::pair<int, int> > touchscreen_ids_; |
| + |
| // Maximum simultaneous touch points supported by device. In the case of |
| // devices with multiple digitizers (e.g. multiple touchscreens), the value |
| // is the maximum of the set of maximum supported contacts by each individual |