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

Unified Diff: ui/events/gesture_detection/touch_disposition_gesture_filter.cc

Issue 227743007: ui::GestureProvider gives GestureEventData the number of touch points. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address jdduke comments. Created 6 years, 8 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/gesture_detection/touch_disposition_gesture_filter.cc
diff --git a/ui/events/gesture_detection/touch_disposition_gesture_filter.cc b/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
index 6f405e58f96faa00f18fbe1fe1c62c8ae17bcbf5..009c21d7fd3e653136c49d51949a8eae474076ab 100644
--- a/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
+++ b/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
@@ -15,12 +15,15 @@ namespace {
COMPILE_ASSERT(ET_GESTURE_TYPE_END - ET_GESTURE_TYPE_START < 32,
gesture_type_count_too_large);
-GestureEventData CreateGesture(EventType type, int motion_event_id) {
+GestureEventData CreateGesture(EventType type,
+ int motion_event_id,
+ int touch_point_count) {
return GestureEventData(type,
motion_event_id,
base::TimeTicks(),
0,
0,
+ touch_point_count,
GestureEventDetails(type, 0, 0));
}
@@ -270,7 +273,7 @@ void TouchDispositionGestureFilter::CancelTapIfNecessary() {
return;
SendGesture(
- CreateGesture(ET_GESTURE_TAP_CANCEL, ending_event_motion_event_id_));
+ CreateGesture(ET_GESTURE_TAP_CANCEL, ending_event_motion_event_id_, 1));
jdduke (slow) 2014/04/09 16:53:05 I don't think we'll ever generate a touch count >
tdresser 2014/04/09 18:21:31 Done.
DCHECK(!needs_tap_ending_event_);
}
@@ -279,7 +282,7 @@ void TouchDispositionGestureFilter::CancelFlingIfNecessary() {
return;
SendGesture(
- CreateGesture(ET_SCROLL_FLING_CANCEL, ending_event_motion_event_id_));
+ CreateGesture(ET_SCROLL_FLING_CANCEL, ending_event_motion_event_id_, 1));
DCHECK(!needs_fling_ending_event_);
}
@@ -288,7 +291,7 @@ void TouchDispositionGestureFilter::EndScrollIfNecessary() {
return;
SendGesture(
- CreateGesture(ET_GESTURE_SCROLL_END, ending_event_motion_event_id_));
+ CreateGesture(ET_GESTURE_SCROLL_END, ending_event_motion_event_id_, 1));
DCHECK(!needs_scroll_ending_event_);
}

Powered by Google App Engine
This is Rietveld 408576698