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 // Reset any active gesture detection, including detection of timeout-based |
| 68 // events (e.g., double-tap or delayed tap) for which the pointer has already |
| 69 // been released. |
| 70 void ResetDetection(); |
| 71 |
67 // Update whether multi-touch pinch zoom is supported by the platform. | 72 // Update whether multi-touch pinch zoom is supported by the platform. |
68 void SetMultiTouchZoomSupportEnabled(bool enabled); | 73 void SetMultiTouchZoomSupportEnabled(bool enabled); |
69 | 74 |
70 // Update whether double-tap gestures are supported by the platform. | 75 // Update whether double-tap gestures are supported by the platform. |
71 void SetDoubleTapSupportForPlatformEnabled(bool enabled); | 76 void SetDoubleTapSupportForPlatformEnabled(bool enabled); |
72 | 77 |
73 // Update whether double-tap gesture detection should be suppressed, e.g., | 78 // 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 | 79 // 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. | 80 // the tap delay, allowing rapid and responsive single-tap gestures. |
76 void SetDoubleTapSupportForPageEnabled(bool enabled); | 81 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. | 113 // Whether double-tap gesture detection is currently supported. |
109 bool double_tap_support_for_page_; | 114 bool double_tap_support_for_page_; |
110 bool double_tap_support_for_platform_; | 115 bool double_tap_support_for_platform_; |
111 | 116 |
112 const bool gesture_begin_end_types_enabled_; | 117 const bool gesture_begin_end_types_enabled_; |
113 }; | 118 }; |
114 | 119 |
115 } // namespace ui | 120 } // namespace ui |
116 | 121 |
117 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 122 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
OLD | NEW |