OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GESTURES_GESTURE_RECOGNIZER_H_ | 5 #ifndef UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_H_ |
6 #define UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_H_ | 6 #define UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 virtual bool ProcessTouchEventPreDispatch(TouchEvent* event, | 32 virtual bool ProcessTouchEventPreDispatch(TouchEvent* event, |
33 GestureConsumer* consumer) = 0; | 33 GestureConsumer* consumer) = 0; |
34 | 34 |
35 // Returns a list of zero or more GestureEvents. The caller is responsible for | 35 // Returns a list of zero or more GestureEvents. The caller is responsible for |
36 // freeing the returned events. Acks the first gesture packet in the queue. | 36 // freeing the returned events. Acks the first gesture packet in the queue. |
37 virtual Gestures* AckAsyncTouchEvent(ui::EventResult result, | 37 virtual Gestures* AckAsyncTouchEvent(ui::EventResult result, |
38 GestureConsumer* consumer) = 0; | 38 GestureConsumer* consumer) = 0; |
39 | 39 |
40 // Returns a list of zero or more GestureEvents. The caller is responsible for | 40 // Returns a list of zero or more GestureEvents. The caller is responsible for |
41 // freeing the returned events. Acks the last gesture packet in the queue. | 41 // freeing the returned events. Acks the last gesture packet in the queue. |
42 virtual Gestures* AckSyncTouchEvent(const uint64 unique_event_id, | 42 virtual Gestures* AckSyncTouchEvent(const uint64 unique_touch_event_id, |
43 ui::EventResult result, | 43 ui::EventResult result, |
44 GestureConsumer* consumer) = 0; | 44 GestureConsumer* consumer) = 0; |
45 | 45 |
46 // This is called when the consumer is destroyed. So this should cleanup any | 46 // This is called when the consumer is destroyed. So this should cleanup any |
47 // internal state maintained for |consumer|. Returns true iff there was | 47 // internal state maintained for |consumer|. Returns true iff there was |
48 // state relating to |consumer| to clean up. | 48 // state relating to |consumer| to clean up. |
49 virtual bool CleanupStateForConsumer(GestureConsumer* consumer) = 0; | 49 virtual bool CleanupStateForConsumer(GestureConsumer* consumer) = 0; |
50 | 50 |
51 // Return the window which should handle this TouchEvent, in the case where | 51 // Return the window which should handle this TouchEvent, in the case where |
52 // the touch is already associated with a target. | 52 // the touch is already associated with a target. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 // Unsubscribes |helper| from async gesture dispatch. | 93 // Unsubscribes |helper| from async gesture dispatch. |
94 // Since the GestureRecognizer does not own the |helper|, it is not deleted | 94 // Since the GestureRecognizer does not own the |helper|, it is not deleted |
95 // and must be cleaned up appropriately by the caller. | 95 // and must be cleaned up appropriately by the caller. |
96 virtual void RemoveGestureEventHelper(GestureEventHelper* helper) = 0; | 96 virtual void RemoveGestureEventHelper(GestureEventHelper* helper) = 0; |
97 }; | 97 }; |
98 | 98 |
99 } // namespace ui | 99 } // namespace ui |
100 | 100 |
101 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_H_ | 101 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_H_ |
OLD | NEW |