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/base/gestures/gesture_sequence.cc

Issue 16018006: Generate tap gesture with tap_count = 3 for triple-tap (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix sky's comment Created 7 years, 7 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 | « ui/base/gestures/gesture_point.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/gestures/gesture_sequence.cc
diff --git a/ui/base/gestures/gesture_sequence.cc b/ui/base/gestures/gesture_sequence.cc
index 2423c1b855b7716292216594d95e22211c64c2c7..f122d1787b2752b13c7454dfe156c442890b5656 100644
--- a/ui/base/gestures/gesture_sequence.cc
+++ b/ui/base/gestures/gesture_sequence.cc
@@ -847,8 +847,12 @@ bool GestureSequence::Click(const TouchEvent& event,
Gestures* gestures) {
DCHECK(state_ == GS_PENDING_SYNTHETIC_CLICK);
if (point.IsInClickWindow(event)) {
- bool double_tap = point.IsInDoubleClickWindow(event);
- AppendClickGestureEvent(point, double_tap ? 2 : 1, gestures);
+ int tap_count = 1;
+ if (point.IsInTripleClickWindow(event))
+ tap_count = 3;
+ else if (point.IsInDoubleClickWindow(event))
+ tap_count = 2;
+ AppendClickGestureEvent(point, tap_count, gestures);
return true;
} else if (point.IsInsideManhattanSquare(event) &&
!GetLongPressTimer()->IsRunning()) {
« no previous file with comments | « ui/base/gestures/gesture_point.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698