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

Unified Diff: ui/events/gesture_detection/scale_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/scale_gesture_detector.h
diff --git a/ui/events/gesture_detection/scale_gesture_detector.h b/ui/events/gesture_detection/scale_gesture_detector.h
index 2d83ca10e71c6b313568455a3be2f438111ee70b..08b62887c3a05ab137587ac2bc0cdf2cd8a975f8 100644
--- a/ui/events/gesture_detection/scale_gesture_detector.h
+++ b/ui/events/gesture_detection/scale_gesture_detector.h
@@ -24,9 +24,15 @@ class ScaleGestureDetector : public GestureDetector::SimpleGestureListener {
Config();
~Config();
GestureDetector::Config gesture_detector_config;
+
+ // Minimum accepted value for TouchMajor while scaling (in dips).
+ float min_scaling_touch_major;
+
+ // Minimum span needed to initiate a scaling gesture (in dips).
+ float min_scaling_span;
+
+ // Whether double-tap drag scaling is enabled.
bool quick_scale_enabled;
- int min_scaling_touch_major;
- int min_scaling_span;
};
class ScaleGestureListener {
@@ -120,8 +126,8 @@ class ScaleGestureDetector : public GestureDetector::SimpleGestureListener {
base::TimeTicks curr_time_;
base::TimeTicks prev_time_;
bool in_progress_;
- int span_slop_;
- int min_span_;
+ float span_slop_;
+ float min_span_;
// Bounds for recently seen values.
float touch_upper_;
@@ -129,7 +135,7 @@ class ScaleGestureDetector : public GestureDetector::SimpleGestureListener {
float touch_history_last_accepted_;
int touch_history_direction_;
base::TimeTicks touch_history_last_accepted_time_;
- int touch_min_major_;
+ float touch_min_major_;
float double_tap_focus_x_;
float double_tap_focus_y_;
DoubleTapMode double_tap_mode_;
« no previous file with comments | « ui/events/gesture_detection/gesture_provider_unittest.cc ('k') | ui/events/gesture_detection/scale_gesture_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698