File: gesture_configuration.cc

package info (click to toggle)
chromium-browser 41.0.2272.118-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 2,189,132 kB
  • sloc: cpp: 9,691,462; ansic: 3,341,451; python: 712,689; asm: 518,779; xml: 208,926; java: 169,820; sh: 119,353; perl: 68,907; makefile: 28,311; yacc: 13,305; objc: 11,385; tcl: 3,186; cs: 2,225; sql: 2,217; lex: 2,215; lisp: 1,349; pascal: 1,256; awk: 407; ruby: 155; sed: 53; php: 14; exp: 11
file content (56 lines) | stat: -rw-r--r-- 2,163 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/events/gesture_detection/gesture_configuration.h"

namespace ui {

GestureConfiguration::GestureConfiguration()
    : default_radius_(25),
      double_tap_timeout_in_ms_(400),
      fling_max_cancel_to_down_time_in_ms_(400),
      fling_max_tap_gap_time_in_ms_(200),
      gesture_begin_end_types_enabled_(false),
      long_press_time_in_ms_(1000),
      max_distance_between_taps_for_double_tap_(20),
      max_distance_for_two_finger_tap_in_pixels_(300),
      max_fling_velocity_(17000.0f),
      max_gesture_bounds_length_(0),
      max_separation_for_gesture_touches_in_pixels_(150),
      max_swipe_deviation_angle_(20),
      max_time_between_double_click_in_ms_(700),
      max_touch_down_duration_for_click_in_ms_(800),
      max_touch_move_in_pixels_for_click_(15),
      min_distance_for_pinch_scroll_in_pixels_(20),
      min_fling_velocity_(30.0f),
      min_gesture_bounds_length_(0),
      min_pinch_update_span_delta_(0),
      // If this is too small, we currently can get single finger pinch zoom.
      // See crbug.com/357237 for details.
      min_scaling_span_in_pixels_(125),
      // The default value of min_scaling_touch_major_ is 2 * default_radius_.
      min_scaling_touch_major_(50),
      min_swipe_velocity_(20),
      // TODO(jdduke): Disable and remove entirely when issues with intermittent
      // scroll end detection on the Pixel are resolved, crbug.com/353702.
#if defined(OS_CHROMEOS)
      scroll_debounce_interval_in_ms_(30),
#else
      scroll_debounce_interval_in_ms_(0),
#endif
      semi_long_press_time_in_ms_(400),
      show_press_delay_in_ms_(150),
      // The default value of span_slop_ is
      // 2 * max_touch_move_in_pixels_for_click_.
      span_slop_(30),
      swipe_enabled_(false),
      tab_scrub_activation_delay_in_ms_(200),
      two_finger_tap_enabled_(false),
      velocity_tracker_strategy_(VelocityTracker::Strategy::STRATEGY_DEFAULT) {
}

GestureConfiguration::~GestureConfiguration() {
}

}  // namespace ui