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

Unified Diff: ui/aura/gestures/gesture_point.cc

Issue 9318010: Tweak the aura gesture recognizer slightly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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_point.h ('k') | ui/aura/gestures/gesture_recognizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/gestures/gesture_point.cc
diff --git a/ui/aura/gestures/gesture_point.cc b/ui/aura/gestures/gesture_point.cc
index 1b0b65a9db7ab14e5ac3f1faf463178e390e6f37..3402e56673331098a3d8e60233bda7736d52a91e 100644
--- a/ui/aura/gestures/gesture_point.cc
+++ b/ui/aura/gestures/gesture_point.cc
@@ -85,6 +85,11 @@ bool GesturePoint::IsInFlickWindow(const TouchEvent& event) const {
return IsOverMinFlickSpeed() && event.type() != ui::ET_TOUCH_CANCELLED;
}
+bool GesturePoint::DidScroll(const TouchEvent& event) const {
+ return abs(last_touch_position_.x() - first_touch_position_.x()) > 0 ||
+ abs(last_touch_position_.y() - first_touch_position_.y()) > 0;
+}
+
bool GesturePoint::IsInClickTimeWindow() const {
double duration = last_touch_time_ - first_touch_time_;
return duration >= kMinimumTouchDownDurationInSecondsForClick &&
« no previous file with comments | « ui/aura/gestures/gesture_point.h ('k') | ui/aura/gestures/gesture_recognizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698