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

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

Issue 630003003: Change GestureConfiguration types to be consistent with each other and with the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix compile Created 6 years, 2 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
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | ui/events/gestures/gesture_configuration.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 94469c502f02f486d8559996b5125f59321553f9..a536bbce8c1ddcacc5e9e909f36a8e4a67c74276 100644
--- a/ui/events/gesture_detection/gesture_config_helper_aura.cc
+++ b/ui/events/gesture_detection/gesture_config_helper_aura.cc
@@ -18,11 +18,11 @@ GestureDetector::Config DefaultGestureDetectorConfig() {
GestureDetector::Config config;
config.longpress_timeout = base::TimeDelta::FromMilliseconds(
- GestureConfiguration::long_press_time_in_seconds() * 1000.);
+ GestureConfiguration::long_press_time_in_ms());
config.showpress_timeout = base::TimeDelta::FromMilliseconds(
GestureConfiguration::show_press_delay_in_ms());
config.double_tap_timeout = base::TimeDelta::FromMilliseconds(
- GestureConfiguration::semi_long_press_time_in_seconds() * 1000.);
+ GestureConfiguration::semi_long_press_time_in_ms());
config.touch_slop =
GestureConfiguration::max_touch_move_in_pixels_for_click();
config.double_tap_slop =
@@ -38,25 +38,21 @@ GestureDetector::Config DefaultGestureDetectorConfig() {
config.two_finger_tap_max_separation =
GestureConfiguration::max_distance_for_two_finger_tap_in_pixels();
config.two_finger_tap_timeout = base::TimeDelta::FromMilliseconds(
- GestureConfiguration::max_touch_down_duration_in_seconds_for_click() *
- 1000.);
+ GestureConfiguration::max_touch_down_duration_for_click_in_ms());
return config;
}
ScaleGestureDetector::Config DefaultScaleGestureDetectorConfig() {
ScaleGestureDetector::Config config;
- double min_pinch_update_distance =
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kCompensateForUnstablePinchZoom)
- ? GestureConfiguration::min_pinch_update_distance_in_pixels()
- : 0;
-
config.span_slop =
GestureConfiguration::max_touch_move_in_pixels_for_click() * 2;
config.min_scaling_touch_major = GestureConfiguration::default_radius() * 2;
config.min_scaling_span = GestureConfiguration::min_scaling_span_in_pixels();
- config.min_pinch_update_span_delta = min_pinch_update_distance;
+ config.min_pinch_update_span_delta =
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kCompensateForUnstablePinchZoom) ?
+ GestureConfiguration::min_pinch_update_distance_in_pixels() : 0;
return config;
}
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | ui/events/gestures/gesture_configuration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698