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

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: 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..c09b31fd68788d61ab150445fcb6a1fa473811a5 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 considered a
+ // double tap (in dips).
+ 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_;
« no previous file with comments | « ui/events/gesture_detection/gesture_config_helper_aura.cc ('k') | ui/events/gesture_detection/gesture_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698