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

Unified Diff: ui/base/gestures/gesture_point.h

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: 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
Index: ui/base/gestures/gesture_point.h
diff --git a/ui/base/gestures/gesture_point.h b/ui/base/gestures/gesture_point.h
index f52fece40ac0dbdc5d68dfc72d79836c4a1ef228..8dbee7a2b58eb73925fe0713d03c6480ff5ed652 100644
--- a/ui/base/gestures/gesture_point.h
+++ b/ui/base/gestures/gesture_point.h
@@ -39,6 +39,7 @@ class GesturePoint {
// represent a click or scroll etc.)
bool IsInClickWindow(const TouchEvent& event) const;
bool IsInDoubleClickWindow(const TouchEvent& event) const;
+ bool IsInTripleClickWindow(const TouchEvent& event) const;
bool IsInScrollWindow(const TouchEvent& event) const;
bool IsInFlickWindow(const TouchEvent& event);
bool IsInHorizontalRailWindow() const;
@@ -86,7 +87,9 @@ class GesturePoint {
// Various statistical functions to manipulate gestures.
bool IsInClickTimeWindow() const;
bool IsInSecondClickTimeWindow() const;
+ bool IsInThirdClickTimeWindow() const;
bool IsSecondClickInsideManhattanSquare(const TouchEvent& event) const;
+ bool IsThirdClickInsideManhattanSquare(const TouchEvent& event) const;
bool IsOverMinFlickSpeed();
// Returns -1, 0, 1 for |v| below the negative velocity threshold,
@@ -112,6 +115,9 @@ class GesturePoint {
gfx::Point last_touch_position_;
double last_touch_time_;
+ double second_last_tap_time_;
+ gfx::Point second_last_tap_position_;
+
double last_tap_time_;
gfx::Point last_tap_position_;

Powered by Google App Engine
This is Rietveld 408576698