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

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

Issue 9751011: Gesture recognition constants should all be stored in the GestureConfiguration object. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Protect unit tests from changes in GestureConfiguration. Created 8 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/aura/gestures/gesture_configuration.h" 5 #include "ui/aura/gestures/gesture_configuration.h"
6 6
7 namespace aura { 7 namespace aura {
8 8
9 // Ordered alphabetically ignoring underscores, to align with the
10 // associated list of prefs in gesture_prefs_aura.cc.
11 int GestureConfiguration::long_press_time_in_ms_ = 500;
12 double GestureConfiguration::max_seconds_between_double_click_ = 0.7;
9 double 13 double
10 GestureConfiguration::max_touch_down_duration_in_seconds_for_click_ = 0.8; 14 GestureConfiguration::max_touch_down_duration_in_seconds_for_click_ = 0.8;
15 double GestureConfiguration::max_touch_move_in_pixels_for_click_ = 20;
16 double GestureConfiguration::min_distance_for_pinch_scroll_in_pixels_ = 20;
17 double GestureConfiguration::min_flick_speed_squared_ = 550.f * 550.f;
18 double GestureConfiguration::min_pinch_update_distance_in_pixels_ = 5;
19 double GestureConfiguration::min_rail_break_velocity_ = 200;
20 double GestureConfiguration::min_scroll_delta_squared_ = 5 * 5;
11 double 21 double
12 GestureConfiguration::min_touch_down_duration_in_seconds_for_click_ = 0.01; 22 GestureConfiguration::min_touch_down_duration_in_seconds_for_click_ = 0.01;
13 double GestureConfiguration::max_seconds_between_double_click_ = 0.7; 23 // The number of points used in the linear regression which determines
14 double GestureConfiguration::max_touch_move_in_pixels_for_click_ = 20; 24 // touch velocity. If fewer than this number of points have been seen,
15 double GestureConfiguration::min_flick_speed_squared_ = 550.f * 550.f; 25 // velocity is reported as 0.
16 double GestureConfiguration::minimum_pinch_update_distance_in_pixels_ = 5; 26 int GestureConfiguration::points_buffered_for_velocity_ = 10;
17 double GestureConfiguration::minimum_distance_for_pinch_scroll_in_pixels_ = 20; 27 double GestureConfiguration::rail_break_proportion_ = 15;
28 double GestureConfiguration::rail_start_proportion_ = 2;
18 29
19 } // namespace aura 30 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698