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

Unified Diff: ui/events/gesture_detection/gesture_detector.h

Issue 220063002: [Android] Use DIP coordinates with MotionEventAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes 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/gesture_detector.h
diff --git a/ui/events/gesture_detection/gesture_detector.h b/ui/events/gesture_detection/gesture_detector.h
index 29a004ae02455fb07d83fa9bf386341823889b73..32b6935c7836dfcd3e35e8c463b8840d7c324ef2 100644
--- a/ui/events/gesture_detection/gesture_detector.h
+++ b/ui/events/gesture_detection/gesture_detector.h
@@ -23,13 +23,23 @@ class GestureDetector {
struct GESTURE_DETECTION_EXPORT Config {
Config();
~Config();
+
base::TimeDelta longpress_timeout;
base::TimeDelta showpress_timeout;
base::TimeDelta double_tap_timeout;
- int scaled_touch_slop;
- int scaled_double_tap_slop;
- int scaled_minimum_fling_velocity;
- int scaled_maximum_fling_velocity;
+
+ // Distance a touch can wander before a scroll will occur (in dips).
+ float touch_slop;
+
+ // Distance the first touch can wander before it is no longer considerd a
+ // double tap (in dips).
tdresser 2014/04/09 14:00:01 Maximum distance between the first and second touc
jdduke (slow) 2014/04/10 22:04:53 Ah, I keep falling into the Texan spelling... ;)
tdresser 2014/04/11 12:18:14 +1
+ float double_tap_slop;
+
+ // Minimum velocity to initiate a fling (in dips/second).
+ float minimum_fling_velocity;
+
+ // Maximum velocity of an initiated fling (in dips/second).
+ float maximum_fling_velocity;
};
class GestureListener {
@@ -114,11 +124,11 @@ class GestureDetector {
GestureListener* const listener_;
DoubleTapListener* double_tap_listener_;
- int touch_slop_square_;
- int double_tap_touch_slop_square_;
- int double_tap_slop_square_;
- int min_fling_velocity_;
- int max_fling_velocity_;
+ float touch_slop_square_;
+ float double_tap_touch_slop_square_;
+ float double_tap_slop_square_;
+ float min_fling_velocity_;
+ float max_fling_velocity_;
base::TimeDelta double_tap_timeout_;
bool still_down_;

Powered by Google App Engine
This is Rietveld 408576698