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

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: 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/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/base/gestures/gesture_point.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b84c3bd7a3fa2e9afa8c8183f5da0bc32971ef70 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;
@@ -85,8 +86,8 @@ class GesturePoint {
private:
// Various statistical functions to manipulate gestures.
bool IsInClickTimeWindow() const;
- bool IsInSecondClickTimeWindow() const;
- bool IsSecondClickInsideManhattanSquare(const TouchEvent& event) const;
+ bool IsInClickAggregateTimeWindow(double before, double after) const;
+ bool IsPointInsideManhattanSquare(gfx::Point p1, gfx::Point p2) const;
bool IsOverMinFlickSpeed();
// Returns -1, 0, 1 for |v| below the negative velocity threshold,
@@ -112,6 +113,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_;
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/base/gestures/gesture_point.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698