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

Unified Diff: ui/events/gestures/gesture_provider_aura.h

Issue 289373009: Support tap_count in ui::GestureProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move to GestureProviderAura. Created 6 years, 7 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/gestures/gesture_provider_aura.h
diff --git a/ui/events/gestures/gesture_provider_aura.h b/ui/events/gestures/gesture_provider_aura.h
index b4a9dedf3a37d3359d5f43d0d32addd92ed32461..a255f2b8aa10f809450248a0026290cd83e91c41 100644
--- a/ui/events/gestures/gesture_provider_aura.h
+++ b/ui/events/gestures/gesture_provider_aura.h
@@ -36,6 +36,18 @@ class EVENTS_EXPORT GestureProviderAura : public GestureProviderClient {
virtual void OnGestureEvent(const GestureEventData& gesture) OVERRIDE;
private:
+ bool IsConsideredDoubleTap(const MotionEvent& previous_down,
+ const base::TimeTicks previous_tap_time,
+ const MotionEvent& current_down) const;
+
+ scoped_ptr<MotionEvent> current_down_event_;
+ scoped_ptr<MotionEvent> previous_down_event_;
+ base::TimeTicks previous_tap_time_;
+
+ // Counts the number of successive taps which occured within the double tap
+ // window. The current maximum is 3.
+ int tap_count_;
+
GestureProviderAuraClient* client_;
MotionEventAura pointer_state_;
FilteredGestureProvider filtered_gesture_provider_;

Powered by Google App Engine
This is Rietveld 408576698