Chromium Code Reviews| 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); | |
|
tdresser
2015/08/04 12:20:50
If you plug in an external touchpad on Android, do
jdduke (slow)
2015/08/04 17:19:25
I don't actually know =/, I was about to order an
| |
| 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()); | |
| 61 // There is no "semi" longpress on Android, just use the longpress value. | |
|
tdresser
2015/08/04 12:20:50
I think it might be clearer to set this to 0.
jdduke (slow)
2015/08/04 17:19:25
Yeah, I went ahead and removed this line, and chan
| |
| 62 set_semi_long_press_time_in_ms( | |
| 63 ViewConfiguration::GetLongPressTimeoutInMs()); | |
| 55 } | 64 } |
| 56 | 65 |
| 57 friend struct DefaultSingletonTraits<GestureConfigurationAndroid>; | 66 friend struct DefaultSingletonTraits<GestureConfigurationAndroid>; |
| 58 DISALLOW_COPY_AND_ASSIGN(GestureConfigurationAndroid); | 67 DISALLOW_COPY_AND_ASSIGN(GestureConfigurationAndroid); |
| 59 }; | 68 }; |
| 60 | 69 |
| 61 } // namespace | 70 } // namespace |
| 62 | 71 |
| 63 // Create a GestureConfigurationAura singleton instance when using Android. | 72 // Create a GestureConfigurationAura singleton instance when using Android. |
| 64 GestureConfiguration* GestureConfiguration::GetPlatformSpecificInstance() { | 73 GestureConfiguration* GestureConfiguration::GetPlatformSpecificInstance() { |
| 65 return GestureConfigurationAndroid::GetInstance(); | 74 return GestureConfigurationAndroid::GetInstance(); |
| 66 } | 75 } |
| 67 | 76 |
| 68 } // namespace ui | 77 } // namespace ui |
| OLD | NEW |