1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/events/gesture_detection/gesture_configuration.h"
9 GestureConfiguration::GestureConfiguration()
10 : default_radius_(25),
11 double_tap_enabled_(false),
12 double_tap_timeout_in_ms_(400),
13 fling_max_cancel_to_down_time_in_ms_(400),
14 fling_max_tap_gap_time_in_ms_(200),
15 gesture_begin_end_types_enabled_(false),
16 long_press_time_in_ms_(1000),
17 max_distance_between_taps_for_double_tap_(20),
18 max_distance_for_two_finger_tap_in_pixels_(300),
19 max_fling_velocity_(17000.0f
),
20 max_gesture_bounds_length_(0),
21 max_separation_for_gesture_touches_in_pixels_(150),
22 max_swipe_deviation_angle_(20),
23 max_time_between_double_click_in_ms_(700),
24 max_touch_down_duration_for_click_in_ms_(800),
25 max_touch_move_in_pixels_for_click_(15),
26 min_distance_for_pinch_scroll_in_pixels_(20),
27 min_fling_velocity_(30.0f
),
28 min_gesture_bounds_length_(0),
29 min_pinch_update_span_delta_(0),
30 // If this is too small, we currently can get single finger pinch zoom.
31 // See crbug.com/357237 for details.
32 min_scaling_span_in_pixels_(125),
33 // The default value of min_scaling_touch_major_ is 2 * default_radius_.
34 min_scaling_touch_major_(50),
35 min_swipe_velocity_(20),
36 // TODO(jdduke): Disable and remove entirely when issues with intermittent
37 // scroll end detection on the Pixel are resolved, crbug.com/353702.
38 #if defined(OS_CHROMEOS)
39 scroll_debounce_interval_in_ms_(30),
41 scroll_debounce_interval_in_ms_(0),
43 semi_long_press_time_in_ms_(400),
44 show_press_delay_in_ms_(150),
45 // The default value of span_slop_ is
46 // 2 * max_touch_move_in_pixels_for_click_.
48 swipe_enabled_(false),
49 tab_scrub_activation_delay_in_ms_(200),
50 two_finger_tap_enabled_(false),
51 velocity_tracker_strategy_(VelocityTracker::Strategy::STRATEGY_DEFAULT
) {
54 GestureConfiguration::~GestureConfiguration() {