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

Side by Side Diff: ui/events/gestures/gesture_configuration.cc

Issue 278183002: Revert of Unified Gesture Recognizer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/events/gestures/gesture_configuration.h ('k') | ui/events/gestures/gesture_provider_aura.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/gestures/gesture_configuration.h" 5 #include "ui/events/gestures/gesture_configuration.h"
6 6
7 namespace ui { 7 namespace ui {
8 8
9 int GestureConfiguration::default_radius_ = 25; 9 int GestureConfiguration::default_radius_ = 25;
10 int GestureConfiguration::fling_max_cancel_to_down_time_in_ms_ = 400; 10 int GestureConfiguration::fling_max_cancel_to_down_time_in_ms_ = 400;
(...skipping 16 matching lines...) Expand all
27 double GestureConfiguration::min_flick_speed_squared_ = 550.f * 550.f; 27 double GestureConfiguration::min_flick_speed_squared_ = 550.f * 550.f;
28 double GestureConfiguration::min_pinch_update_distance_in_pixels_ = 5; 28 double GestureConfiguration::min_pinch_update_distance_in_pixels_ = 5;
29 double GestureConfiguration::min_rail_break_velocity_ = 200; 29 double GestureConfiguration::min_rail_break_velocity_ = 200;
30 double GestureConfiguration::min_scroll_delta_squared_ = 4 * 4; 30 double GestureConfiguration::min_scroll_delta_squared_ = 4 * 4;
31 float GestureConfiguration::min_scroll_velocity_ = 30.0f; 31 float GestureConfiguration::min_scroll_velocity_ = 30.0f;
32 double GestureConfiguration::min_swipe_speed_ = 20; 32 double GestureConfiguration::min_swipe_speed_ = 20;
33 double GestureConfiguration::scroll_prediction_seconds_ = 0.03; 33 double GestureConfiguration::scroll_prediction_seconds_ = 0.03;
34 double 34 double
35 GestureConfiguration::min_touch_down_duration_in_seconds_for_click_ = 0.01; 35 GestureConfiguration::min_touch_down_duration_in_seconds_for_click_ = 0.01;
36 36
37 // If this is too small, we currently can get single finger pinch zoom. See
38 // crbug.com/357237 for details.
39 int GestureConfiguration::min_scaling_span_in_pixels_ = 125;
40
41 // The number of points used in the linear regression which determines 37 // The number of points used in the linear regression which determines
42 // touch velocity. Velocity is reported for 2 or more touch move events. 38 // touch velocity. Velocity is reported for 2 or more touch move events.
43 int GestureConfiguration::points_buffered_for_velocity_ = 8; 39 int GestureConfiguration::points_buffered_for_velocity_ = 8;
44 double GestureConfiguration::rail_break_proportion_ = 15; 40 double GestureConfiguration::rail_break_proportion_ = 15;
45 double GestureConfiguration::rail_start_proportion_ = 2; 41 double GestureConfiguration::rail_start_proportion_ = 2;
46 int GestureConfiguration::show_press_delay_in_ms_ = 150; 42 int GestureConfiguration::show_press_delay_in_ms_ = 150;
47 43
48 // Coefficients for a function that computes fling acceleration. 44 // Coefficients for a function that computes fling acceleration.
49 // These are empirically determined defaults. Do not adjust without 45 // These are empirically determined defaults. Do not adjust without
50 // additional empirical validation. 46 // additional empirical validation.
51 float GestureConfiguration::fling_acceleration_curve_coefficients_[ 47 float GestureConfiguration::fling_acceleration_curve_coefficients_[
52 NumAccelParams] = { 48 NumAccelParams] = {
53 0.0166667f, 49 0.0166667f,
54 -0.0238095f, 50 -0.0238095f,
55 0.0452381f, 51 0.0452381f,
56 0.8f 52 0.8f
57 }; 53 };
58 54
59 } // namespace ui 55 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gestures/gesture_configuration.h ('k') | ui/events/gestures/gesture_provider_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698