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

Unified Diff: ui/events/gesture_detection/gesture_provider.h

Issue 223673006: Support GestureBegin and GestureEnd in ui::GestureProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address jdduke's comments. Created 6 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/gesture_detection/gesture_provider.h
diff --git a/ui/events/gesture_detection/gesture_provider.h b/ui/events/gesture_detection/gesture_provider.h
index fce59268f688c98bf7455069340a5fb9af1830f2..e8bd52d48a2ec2291e1ce2c6367bcabe95858a8a 100644
--- a/ui/events/gesture_detection/gesture_provider.h
+++ b/ui/events/gesture_detection/gesture_provider.h
@@ -32,7 +32,17 @@ class GESTURE_DETECTION_EXPORT GestureProvider {
GestureDetector::Config gesture_detector_config;
ScaleGestureDetector::Config scale_gesture_detector_config;
SnapScrollController::Config snap_scroll_controller_config;
+
+ // There is normally a delay before a tap event is fired, in order to allow
jdduke (slow) 2014/04/04 19:08:36 Nit: |When double-tap support is enabled, there wi
tdresser 2014/04/07 13:42:55 Done.
+ // the double tap gesture to occur without firing any tap events. If
+ // |disable_click_delay| is true, there will be no delay before a tap event
+ // is fired.
bool disable_click_delay;
+
+ // If |gesture_begin_end_types_enabled| is true, fire an ET_GESTURE_BEGIN
+ // event for every added touch point, and an ET_GESTURE_END event for every
+ // removed touch point.
+ bool gesture_begin_end_types_enabled;
};
GestureProvider(const Config& config, GestureProviderClient* client);
@@ -97,6 +107,9 @@ class GESTURE_DETECTION_EXPORT GestureProvider {
bool SendLongTapIfNecessary(const MotionEvent& event);
void EndTouchScrollIfNecessary(base::TimeTicks time,
bool send_scroll_end_event);
+ void OnTouchEventHandlingBegin(const MotionEvent& event);
+ void OnTouchEventHandlingEnd(const MotionEvent& event);
+
void UpdateDoubleTapDetectionSupport();
GestureProviderClient* const client_;
@@ -133,6 +146,8 @@ class GESTURE_DETECTION_EXPORT GestureProvider {
// opened after a GESTURE_LONG_PRESS, this is used to insert a
// GESTURE_TAP_CANCEL for removing any ::active styling.
base::TimeTicks current_longpress_time_;
+
+ bool gesture_begin_end_types_enabled_;
};
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698