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 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/events/gesture_detection/gesture_detection_export.h" | 10 #include "ui/events/gesture_detection/gesture_detection_export.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 float max_gesture_bounds_length; | 57 float max_gesture_bounds_length; |
58 }; | 58 }; |
59 | 59 |
60 GestureProvider(const Config& config, GestureProviderClient* client); | 60 GestureProvider(const Config& config, GestureProviderClient* client); |
61 ~GestureProvider(); | 61 ~GestureProvider(); |
62 | 62 |
63 // Handle the incoming MotionEvent, returning false if the event could not | 63 // Handle the incoming MotionEvent, returning false if the event could not |
64 // be handled. | 64 // be handled. |
65 bool OnTouchEvent(const MotionEvent& event); | 65 bool OnTouchEvent(const MotionEvent& event); |
66 | 66 |
| 67 // Cancel any current gesture detection, also preventing any pending |
| 68 // timeout-based events. |
| 69 void ResetDetection(); |
| 70 |
67 // Update whether multi-touch pinch zoom is supported by the platform. | 71 // Update whether multi-touch pinch zoom is supported by the platform. |
68 void SetMultiTouchZoomSupportEnabled(bool enabled); | 72 void SetMultiTouchZoomSupportEnabled(bool enabled); |
69 | 73 |
70 // Update whether double-tap gestures are supported by the platform. | 74 // Update whether double-tap gestures are supported by the platform. |
71 void SetDoubleTapSupportForPlatformEnabled(bool enabled); | 75 void SetDoubleTapSupportForPlatformEnabled(bool enabled); |
72 | 76 |
73 // Update whether double-tap gesture detection should be suppressed, e.g., | 77 // Update whether double-tap gesture detection should be suppressed, e.g., |
74 // if the page scale is fixed or the page has a mobile viewport. This disables | 78 // if the page scale is fixed or the page has a mobile viewport. This disables |
75 // the tap delay, allowing rapid and responsive single-tap gestures. | 79 // the tap delay, allowing rapid and responsive single-tap gestures. |
76 void SetDoubleTapSupportForPageEnabled(bool enabled); | 80 void SetDoubleTapSupportForPageEnabled(bool enabled); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // Whether double-tap gesture detection is currently supported. | 112 // Whether double-tap gesture detection is currently supported. |
109 bool double_tap_support_for_page_; | 113 bool double_tap_support_for_page_; |
110 bool double_tap_support_for_platform_; | 114 bool double_tap_support_for_platform_; |
111 | 115 |
112 const bool gesture_begin_end_types_enabled_; | 116 const bool gesture_begin_end_types_enabled_; |
113 }; | 117 }; |
114 | 118 |
115 } // namespace ui | 119 } // namespace ui |
116 | 120 |
117 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 121 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
OLD | NEW |