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

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

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_config_helper_aura.cc
diff --git a/ui/events/gesture_detection/gesture_config_helper_aura.cc b/ui/events/gesture_detection/gesture_config_helper_aura.cc
index 25cce58ee290e35655aa62c18f9019a3f2f344f2..e7845ac621e5a53121b34d157a5be1b06956f809 100644
--- a/ui/events/gesture_detection/gesture_config_helper_aura.cc
+++ b/ui/events/gesture_detection/gesture_config_helper_aura.cc
@@ -8,6 +8,7 @@
#include "ui/gfx/screen.h"
namespace ui {
+namespace {
GestureDetector::Config DefaultGestureDetectorConfig() {
GestureDetector::Config config;
@@ -18,13 +19,13 @@ GestureDetector::Config DefaultGestureDetectorConfig() {
GestureConfiguration::show_press_delay_in_ms());
config.double_tap_timeout = base::TimeDelta::FromMilliseconds(
GestureConfiguration::semi_long_press_time_in_seconds() * 1000.);
- config.scaled_touch_slop =
+ config.touch_slop =
GestureConfiguration::max_touch_move_in_pixels_for_click();
- config.scaled_double_tap_slop =
+ config.double_tap_slop =
GestureConfiguration::max_distance_between_taps_for_double_tap();
- config.scaled_minimum_fling_velocity =
+ config.minimum_fling_velocity =
GestureConfiguration::min_scroll_velocity();
- config.scaled_maximum_fling_velocity =
+ config.maximum_fling_velocity =
GestureConfiguration::fling_velocity_cap();
return config;
@@ -34,30 +35,19 @@ ScaleGestureDetector::Config DefaultScaleGestureDetectorConfig() {
ScaleGestureDetector::Config config;
config.gesture_detector_config = DefaultGestureDetectorConfig();
- config.min_scaling_touch_major = GestureConfiguration::default_radius() / 2;
+ config.min_scaling_touch_major = GestureConfiguration::default_radius() * 2;
config.min_scaling_span =
GestureConfiguration::min_distance_for_pinch_scroll_in_pixels();
return config;
}
-SnapScrollController::Config DefaultSnapScrollControllerConfig() {
- SnapScrollController::Config config;
-
- const gfx::Display& display =
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
-
- config.screen_width_pixels = display.GetSizeInPixel().width();
- config.screen_height_pixels = display.GetSizeInPixel().height();
- config.device_scale_factor = display.device_scale_factor();
-
- return config;
-}
+} // namespace
GestureProvider::Config DefaultGestureProviderConfig() {
GestureProvider::Config config;
+ config.display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
config.gesture_detector_config = DefaultGestureDetectorConfig();
config.scale_gesture_detector_config = DefaultScaleGestureDetectorConfig();
- config.snap_scroll_controller_config = DefaultSnapScrollControllerConfig();
config.gesture_begin_end_types_enabled = true;
return config;
}
« no previous file with comments | « ui/events/gesture_detection/gesture_config_helper_android.cc ('k') | ui/events/gesture_detection/gesture_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698