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_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 "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 bool OnTouchEvent(TouchEvent* event); | 32 bool OnTouchEvent(TouchEvent* event); |
33 void OnTouchEventAck(uint32 unique_event_id, bool event_consumed); | 33 void OnTouchEventAck(uint32 unique_event_id, bool event_consumed); |
34 const MotionEventAura& pointer_state() { return pointer_state_; } | 34 const MotionEventAura& pointer_state() { return pointer_state_; } |
35 ScopedVector<GestureEvent>* GetAndResetPendingGestures(); | 35 ScopedVector<GestureEvent>* GetAndResetPendingGestures(); |
36 | 36 |
37 // GestureProviderClient implementation | 37 // GestureProviderClient implementation |
38 void OnGestureEvent(const GestureEventData& gesture) override; | 38 void OnGestureEvent(const GestureEventData& gesture) override; |
39 | 39 |
40 private: | 40 private: |
41 bool IsConsideredDoubleTap(const GestureEventData& previous_tap, | |
42 const GestureEventData& current_tap) const; | |
43 | |
44 scoped_ptr<GestureEventData> previous_tap_; | |
45 | |
46 GestureProviderAuraClient* client_; | 41 GestureProviderAuraClient* client_; |
47 MotionEventAura pointer_state_; | 42 MotionEventAura pointer_state_; |
48 FilteredGestureProvider filtered_gesture_provider_; | 43 FilteredGestureProvider filtered_gesture_provider_; |
49 | 44 |
50 bool handling_event_; | 45 bool handling_event_; |
51 ScopedVector<GestureEvent> pending_gestures_; | 46 ScopedVector<GestureEvent> pending_gestures_; |
52 | 47 |
53 DISALLOW_COPY_AND_ASSIGN(GestureProviderAura); | 48 DISALLOW_COPY_AND_ASSIGN(GestureProviderAura); |
54 }; | 49 }; |
55 | 50 |
56 } // namespace ui | 51 } // namespace ui |
57 | 52 |
58 #endif // UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ | 53 #endif // UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_ |
OLD | NEW |