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

Unified Diff: ui/events/gesture_detection/scale_gesture_detector.cc

Issue 200623003: Adopt "QuickScale" double-tap drag zoom code in the GestureProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment Created 6 years, 9 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.cc
diff --git a/ui/events/gesture_detection/scale_gesture_detector.cc b/ui/events/gesture_detection/scale_gesture_detector.cc
index 782f3dd24807e8150c7265e6b9fba16837e6aee6..ea4644888453de292fcc1cd010bf9815e699f0dd 100644
--- a/ui/events/gesture_detection/scale_gesture_detector.cc
+++ b/ui/events/gesture_detection/scale_gesture_detector.cc
@@ -26,7 +26,7 @@ const float kScaleFactor = .5f;
// Note: These constants were taken directly from the default (unscaled)
// versions found in Android's ViewConfiguration.
ScaleGestureDetector::Config::Config()
- : quick_scale_enabled(false),
+ : quick_scale_enabled(true),
min_scaling_touch_major(48),
min_scaling_span(200) {}
@@ -245,6 +245,10 @@ bool ScaleGestureDetector::IsQuickScaleEnabled() const {
bool ScaleGestureDetector::IsInProgress() const { return in_progress_; }
+bool ScaleGestureDetector::InDoubleTapMode() const {
+ return double_tap_mode_ == DOUBLE_TAP_MODE_IN_PROGRESS;
+}
+
float ScaleGestureDetector::GetFocusX() const { return focus_x_; }
float ScaleGestureDetector::GetFocusY() const { return focus_y_; }
@@ -360,8 +364,4 @@ void ScaleGestureDetector::ClearTouchHistory() {
touch_history_last_accepted_time_ = base::TimeTicks();
}
-bool ScaleGestureDetector::InDoubleTapMode() const {
- return double_tap_mode_ == DOUBLE_TAP_MODE_IN_PROGRESS;
-}
-
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698