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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 set_min_fling_velocity( | 45 set_min_fling_velocity( |
46 ViewConfiguration::GetMinimumFlingVelocityInDipsPerSecond()); | 46 ViewConfiguration::GetMinimumFlingVelocityInDipsPerSecond()); |
47 set_min_gesture_bounds_length(kMinGestureBoundsLengthDips); | 47 set_min_gesture_bounds_length(kMinGestureBoundsLengthDips); |
48 set_min_pinch_update_span_delta(0.f); | 48 set_min_pinch_update_span_delta(0.f); |
49 set_min_scaling_span_in_pixels( | 49 set_min_scaling_span_in_pixels( |
50 ViewConfiguration::GetMinScalingSpanInDips()); | 50 ViewConfiguration::GetMinScalingSpanInDips()); |
51 set_min_scaling_touch_major( | 51 set_min_scaling_touch_major( |
52 ViewConfiguration::GetMinScalingTouchMajorInDips()); | 52 ViewConfiguration::GetMinScalingTouchMajorInDips()); |
53 set_show_press_delay_in_ms(ViewConfiguration::GetTapTimeoutInMs()); | 53 set_show_press_delay_in_ms(ViewConfiguration::GetTapTimeoutInMs()); |
54 set_span_slop(ViewConfiguration::GetTouchSlopInDips() * 2.f); | 54 set_span_slop(ViewConfiguration::GetTouchSlopInDips() * 2.f); |
| 55 set_fling_touchscreen_tap_suppression_enabled(true); |
| 56 set_fling_touchpad_tap_suppression_enabled(false); |
| 57 set_fling_max_cancel_to_down_time_in_ms( |
| 58 ViewConfiguration::GetTapTimeoutInMs()); |
| 59 set_fling_max_tap_gap_time_in_ms( |
| 60 ViewConfiguration::GetLongPressTimeoutInMs()); |
55 } | 61 } |
56 | 62 |
57 friend struct DefaultSingletonTraits<GestureConfigurationAndroid>; | 63 friend struct DefaultSingletonTraits<GestureConfigurationAndroid>; |
58 DISALLOW_COPY_AND_ASSIGN(GestureConfigurationAndroid); | 64 DISALLOW_COPY_AND_ASSIGN(GestureConfigurationAndroid); |
59 }; | 65 }; |
60 | 66 |
61 } // namespace | 67 } // namespace |
62 | 68 |
63 // Create a GestureConfigurationAura singleton instance when using Android. | 69 // Create a GestureConfigurationAura singleton instance when using Android. |
64 GestureConfiguration* GestureConfiguration::GetPlatformSpecificInstance() { | 70 GestureConfiguration* GestureConfiguration::GetPlatformSpecificInstance() { |
65 return GestureConfigurationAndroid::GetInstance(); | 71 return GestureConfigurationAndroid::GetInstance(); |
66 } | 72 } |
67 | 73 |
68 } // namespace ui | 74 } // namespace ui |
OLD | NEW |