OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/gesture_detection/gesture_configuration.h" | 5 #include "ui/events/gesture_detection/gesture_configuration.h" |
6 | 6 |
7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "ui/gfx/android/view_configuration.h" | 8 #include "ui/gfx/android/view_configuration.h" |
9 #include "ui/gfx/screen.h" | 9 #include "ui/gfx/screen.h" |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 } | 30 } |
31 | 31 |
32 private: | 32 private: |
33 GestureConfigurationAndroid() : GestureConfiguration() { | 33 GestureConfigurationAndroid() : GestureConfiguration() { |
34 set_double_tap_enabled(true); | 34 set_double_tap_enabled(true); |
35 set_double_tap_timeout_in_ms(ViewConfiguration::GetDoubleTapTimeoutInMs()); | 35 set_double_tap_timeout_in_ms(ViewConfiguration::GetDoubleTapTimeoutInMs()); |
36 set_gesture_begin_end_types_enabled(false); | 36 set_gesture_begin_end_types_enabled(false); |
37 set_long_press_time_in_ms(ViewConfiguration::GetLongPressTimeoutInMs()); | 37 set_long_press_time_in_ms(ViewConfiguration::GetLongPressTimeoutInMs()); |
38 set_max_distance_between_taps_for_double_tap( | 38 set_max_distance_between_taps_for_double_tap( |
39 ViewConfiguration::GetDoubleTapSlopInDips()); | 39 ViewConfiguration::GetDoubleTapSlopInDips()); |
| 40 set_max_tap_count(2); |
40 set_max_fling_velocity( | 41 set_max_fling_velocity( |
41 ViewConfiguration::GetMaximumFlingVelocityInDipsPerSecond()); | 42 ViewConfiguration::GetMaximumFlingVelocityInDipsPerSecond()); |
42 set_max_gesture_bounds_length(kMaxGestureBoundsLengthDips); | 43 set_max_gesture_bounds_length(kMaxGestureBoundsLengthDips); |
43 set_max_touch_move_in_pixels_for_click( | 44 set_max_touch_move_in_pixels_for_click( |
44 ViewConfiguration::GetTouchSlopInDips()); | 45 ViewConfiguration::GetTouchSlopInDips()); |
45 set_min_fling_velocity( | 46 set_min_fling_velocity( |
46 ViewConfiguration::GetMinimumFlingVelocityInDipsPerSecond()); | 47 ViewConfiguration::GetMinimumFlingVelocityInDipsPerSecond()); |
47 set_min_gesture_bounds_length(kMinGestureBoundsLengthDips); | 48 set_min_gesture_bounds_length(kMinGestureBoundsLengthDips); |
48 set_min_pinch_update_span_delta(0.f); | 49 set_min_pinch_update_span_delta(0.f); |
49 set_min_scaling_span_in_pixels( | 50 set_min_scaling_span_in_pixels( |
(...skipping 15 matching lines...) Expand all Loading... |
65 }; | 66 }; |
66 | 67 |
67 } // namespace | 68 } // namespace |
68 | 69 |
69 // Create a GestureConfigurationAura singleton instance when using Android. | 70 // Create a GestureConfigurationAura singleton instance when using Android. |
70 GestureConfiguration* GestureConfiguration::GetPlatformSpecificInstance() { | 71 GestureConfiguration* GestureConfiguration::GetPlatformSpecificInstance() { |
71 return GestureConfigurationAndroid::GetInstance(); | 72 return GestureConfigurationAndroid::GetInstance(); |
72 } | 73 } |
73 | 74 |
74 } // namespace ui | 75 } // namespace ui |
OLD | NEW |