| OLD | NEW |
| 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 27 matching lines...) Expand all Loading... |
| 38 // crbug.com/357237 for details. | 38 // crbug.com/357237 for details. |
| 39 int GestureConfiguration::min_scaling_span_in_pixels_ = 125; | 39 int GestureConfiguration::min_scaling_span_in_pixels_ = 125; |
| 40 | 40 |
| 41 // The number of points used in the linear regression which determines | 41 // The number of points used in the linear regression which determines |
| 42 // touch velocity. Velocity is reported for 2 or more touch move events. | 42 // touch velocity. Velocity is reported for 2 or more touch move events. |
| 43 int GestureConfiguration::points_buffered_for_velocity_ = 8; | 43 int GestureConfiguration::points_buffered_for_velocity_ = 8; |
| 44 double GestureConfiguration::rail_break_proportion_ = 15; | 44 double GestureConfiguration::rail_break_proportion_ = 15; |
| 45 double GestureConfiguration::rail_start_proportion_ = 2; | 45 double GestureConfiguration::rail_start_proportion_ = 2; |
| 46 int GestureConfiguration::show_press_delay_in_ms_ = 150; | 46 int GestureConfiguration::show_press_delay_in_ms_ = 150; |
| 47 | 47 |
| 48 // TODO(jdduke): Disable and remove entirely when issues with spurious |
| 49 // scroll end detection on the Pixel are resolved, crbug.com/353702. |
| 50 #if defined(OS_CHROMEOS) |
| 51 int GestureConfiguration::scroll_debounce_interval_in_ms_ = 30; |
| 52 #else |
| 53 int GestureConfiguration::scroll_debounce_interval_in_ms_ = 0; |
| 54 #endif |
| 55 |
| 48 // Coefficients for a function that computes fling acceleration. | 56 // Coefficients for a function that computes fling acceleration. |
| 49 // These are empirically determined defaults. Do not adjust without | 57 // These are empirically determined defaults. Do not adjust without |
| 50 // additional empirical validation. | 58 // additional empirical validation. |
| 51 float GestureConfiguration::fling_acceleration_curve_coefficients_[ | 59 float GestureConfiguration::fling_acceleration_curve_coefficients_[ |
| 52 NumAccelParams] = { | 60 NumAccelParams] = { |
| 53 0.0166667f, | 61 0.0166667f, |
| 54 -0.0238095f, | 62 -0.0238095f, |
| 55 0.0452381f, | 63 0.0452381f, |
| 56 0.8f | 64 0.8f |
| 57 }; | 65 }; |
| 58 | 66 |
| 59 } // namespace ui | 67 } // namespace ui |
| OLD | NEW |