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

Unified Diff: ui/events/x/touch_factory_x11.h

Issue 134773004: Include external touchscreen vid/pid in UMA hardware profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Method rename. Created 6 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 side-by-side diff with in-line comments
Download patch
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..079b005be46ca6709f01e48b2b7bb7156c0a4d20 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>
jar (doing other things) 2014/01/20 22:34:47 nit: For std::pair, should you #include <utility>
tdresser 2014/01/21 13:44:34 Done.
#include <vector>
#include "base/timer/timer.h"
@@ -72,6 +73,11 @@ class EVENTS_BASE_EXPORT TouchFactory {
// Whether any touch device is currently present and enabled.
bool IsTouchDevicePresent();
+ // Pairs of <vendor id, product id> of external touch screens.
+ const std::set<std::pair<int, int> >& GetTouchscreenIds() const {
+ return touchscreen_ids_;
+ }
+
// Return maximum simultaneous touch points supported by device.
int GetMaxTouchPoints() const;
@@ -89,6 +95,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,
@@ -111,6 +119,9 @@ class EVENTS_BASE_EXPORT TouchFactory {
// Indicates whether touch events are explicitly disabled.
bool touch_events_disabled_;
+ // Indicates whether the device's internal display produces touch events.
+ bool internal_display_supports_touch_;
+
// The list of touch devices. For testing/debugging purposes, a single-pointer
// device (mouse or touch screen without sufficient X/driver support for MT)
// can sometimes be treated as a touch device. The key in the map represents
@@ -118,6 +129,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

Powered by Google App Engine
This is Rietveld 408576698