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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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_UI_GESTURE_PROVIDER_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_
6 #define UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/events_export.h" 10 #include "ui/events/events_export.h"
(...skipping 18 matching lines...) Expand all
29 virtual ~GestureProviderAura(); 29 virtual ~GestureProviderAura();
30 30
31 bool OnTouchEvent(const TouchEvent& event); 31 bool OnTouchEvent(const TouchEvent& event);
32 void OnTouchEventAck(bool event_consumed); 32 void OnTouchEventAck(bool event_consumed);
33 const MotionEventAura& pointer_state() { return pointer_state_; } 33 const MotionEventAura& pointer_state() { return pointer_state_; }
34 34
35 // GestureProviderClient implementation 35 // GestureProviderClient implementation
36 virtual void OnGestureEvent(const GestureEventData& gesture) OVERRIDE; 36 virtual void OnGestureEvent(const GestureEventData& gesture) OVERRIDE;
37 37
38 private: 38 private:
39 bool IsConsideredDoubleTap(const MotionEvent& previous_down,
40 const base::TimeTicks previous_tap_time,
41 const MotionEvent& current_down) const;
42
43 scoped_ptr<MotionEvent> current_down_event_;
44 scoped_ptr<MotionEvent> previous_down_event_;
45 base::TimeTicks previous_tap_time_;
46
47 // Counts the number of successive taps which occured within the double tap
48 // window. The current maximum is 3.
49 int tap_count_;
50
39 GestureProviderAuraClient* client_; 51 GestureProviderAuraClient* client_;
40 MotionEventAura pointer_state_; 52 MotionEventAura pointer_state_;
41 FilteredGestureProvider filtered_gesture_provider_; 53 FilteredGestureProvider filtered_gesture_provider_;
42 54
43 int last_touch_event_flags_; 55 int last_touch_event_flags_;
44 56
45 DISALLOW_COPY_AND_ASSIGN(GestureProviderAura); 57 DISALLOW_COPY_AND_ASSIGN(GestureProviderAura);
46 }; 58 };
47 59
48 } // namespace ui 60 } // namespace ui
49 61
50 #endif // UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ 62 #endif // UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698