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 // MSVC++ requires this to be set before any other includes to get M_PI. | 5 // MSVC++ requires this to be set before any other includes to get M_PI. |
6 #define _USE_MATH_DEFINES | 6 #define _USE_MATH_DEFINES |
7 | 7 |
8 #include "ui/events/gesture_detection/gesture_config_helper.h" | 8 #include "ui/events/gesture_detection/gesture_config_helper.h" |
9 | 9 |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } | 58 } |
59 | 59 |
60 } // namespace | 60 } // namespace |
61 | 61 |
62 GestureProvider::Config DefaultGestureProviderConfig() { | 62 GestureProvider::Config DefaultGestureProviderConfig() { |
63 GestureProvider::Config config; | 63 GestureProvider::Config config; |
64 config.display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); | 64 config.display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); |
65 config.gesture_detector_config = DefaultGestureDetectorConfig(); | 65 config.gesture_detector_config = DefaultGestureDetectorConfig(); |
66 config.scale_gesture_detector_config = DefaultScaleGestureDetectorConfig(); | 66 config.scale_gesture_detector_config = DefaultScaleGestureDetectorConfig(); |
67 config.gesture_begin_end_types_enabled = true; | 67 config.gesture_begin_end_types_enabled = true; |
| 68 // Half the size of the default touch length is a reasonable minimum. |
| 69 config.min_gesture_bounds_length = GestureConfiguration::default_radius(); |
68 return config; | 70 return config; |
69 } | 71 } |
70 | 72 |
71 } // namespace ui | 73 } // namespace ui |
OLD | NEW |