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

Unified Diff: views/touchui/touch_factory.h

Issue 7792094: touchui: support XInput2 MT (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Update patch set according to comment #33 Created 9 years, 3 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
« no previous file with comments | « views/focus/accelerator_handler_touch.cc ('k') | views/touchui/touch_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/touchui/touch_factory.h
diff --git a/views/touchui/touch_factory.h b/views/touchui/touch_factory.h
index b18d8c38edede77969c88d8c703ddddf2381e6dd..ca281e420e64d42dc2fbd48e890fe8107358f6ff 100644
--- a/views/touchui/touch_factory.h
+++ b/views/touchui/touch_factory.h
@@ -42,9 +42,15 @@ class VIEWS_EXPORT TouchFactory {
// 'Tracking ID' marks the removal of a touch point. During the lifetime of
// a touchpoint, we use the 'Slot ID' as its identifier. The XI_ButtonPress
// and XI_ButtonRelease events are ignored.
+#if !defined(USE_XI2_MT)
TP_SLOT_ID, // ID of the finger that triggered a touch event
// (useful when tracking multiple simultaneous
// touches)
+#endif
+ // NOTE for XInput MT: 'Tracking ID' is provided in every touch event to
+ // track individual touch. 'Tracking ID' is an unsigned 32-bit value and
+ // is increased for each new touch. It will wrap back to 0 when reaching
+ // the numerical limit.
TP_TRACKING_ID, // ID of the touch point.
TP_LAST_ENTRY
@@ -71,11 +77,13 @@ class VIEWS_EXPORT TouchFactory {
// Is the device a touch-device?
bool IsTouchDevice(unsigned int deviceid) const;
+#if !defined(USE_XI2_MT)
// Is the slot ID currently used?
bool IsSlotUsed(int slot) const;
// Marks a slot as being used/unused.
void SetSlotUsed(int slot, bool used);
+#endif
// Grabs the touch devices for the specified window on the specified display.
// Returns if grab was successful for all touch devices.
@@ -182,11 +190,13 @@ class VIEWS_EXPORT TouchFactory {
int touch_param_min_[kMaxDeviceNum][TP_LAST_ENTRY];
int touch_param_max_[kMaxDeviceNum][TP_LAST_ENTRY];
+#if !defined(USE_XI2_MT)
// Maximum simultaneous touch points.
static const int kMaxTouchPoints = 32;
// A lookup table for slots in use for a touch event.
std::bitset<kMaxTouchPoints> slots_used_;
+#endif
DISALLOW_COPY_AND_ASSIGN(TouchFactory);
};
« no previous file with comments | « views/focus/accelerator_handler_touch.cc ('k') | views/touchui/touch_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698