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

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

Issue 321563002: Support minimum gesture bounds in GestureProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak test Created 6 years, 6 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_config_helper_android.cc
diff --git a/ui/events/gesture_detection/gesture_config_helper_android.cc b/ui/events/gesture_detection/gesture_config_helper_android.cc
index e37650a509188a60ffb9ef1bc3f6c156c1d44257..5393c65b6e49948634eb7fc036437d9b28e667b3 100644
--- a/ui/events/gesture_detection/gesture_config_helper_android.cc
+++ b/ui/events/gesture_detection/gesture_config_helper_android.cc
@@ -13,6 +13,10 @@ namespace ui {
namespace {
// TODO(jdduke): Adopt GestureConfiguration on Android, crbug/339203.
+// This was the minimum tap/press size used on Android before the new gesture
+// detection pipeline.
+const float kMinGestureBoundLengthDips = 24.f;
+
GestureDetector::Config DefaultGestureDetectorConfig(
const gfx::Display& display) {
GestureDetector::Config config;
@@ -62,6 +66,7 @@ GestureProvider::Config DefaultGestureProviderConfig() {
config.scale_gesture_detector_config =
DefaultScaleGestureDetectorConfig(config.display);
config.gesture_begin_end_types_enabled = false;
+ config.min_gesture_bounds_length = kMinGestureBoundLengthDips;
return config;
}

Powered by Google App Engine
This is Rietveld 408576698