Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: ui/events/gesture_detection/gesture_provider.h

Issue 660663002: Clear pending events upon main frame navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/filtered_gesture_provider.cc ('k') | ui/events/gesture_detection/gesture_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698