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 22 matching lines...) Expand all Loading... |
33 GestureConsumer* consumer) = 0; | 33 GestureConsumer* consumer) = 0; |
34 // Returns a list of zero or more GestureEvents. The caller is responsible for | 34 // Returns a list of zero or more GestureEvents. The caller is responsible for |
35 // freeing the returned events. Called synchronously after event dispatch. | 35 // freeing the returned events. Called synchronously after event dispatch. |
36 virtual Gestures* ProcessTouchEventPostDispatch( | 36 virtual Gestures* ProcessTouchEventPostDispatch( |
37 const TouchEvent& event, | 37 const TouchEvent& event, |
38 ui::EventResult result, | 38 ui::EventResult result, |
39 GestureConsumer* consumer) = 0; | 39 GestureConsumer* consumer) = 0; |
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. Called when a touch event receives an | 41 // freeing the returned events. Called when a touch event receives an |
42 // asynchronous ack. | 42 // asynchronous ack. |
43 virtual Gestures* ProcessTouchEventOnAsyncAck(const TouchEvent& event, | 43 virtual Gestures* ProcessTouchEventOnAsyncAck(ui::EventResult result, |
44 ui::EventResult result, | |
45 GestureConsumer* consumer) = 0; | 44 GestureConsumer* consumer) = 0; |
46 | 45 |
47 // 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 |
48 // internal state maintained for |consumer|. Returns true iff there was | 47 // internal state maintained for |consumer|. Returns true iff there was |
49 // state relating to |consumer| to clean up. | 48 // state relating to |consumer| to clean up. |
50 virtual bool CleanupStateForConsumer(GestureConsumer* consumer) = 0; | 49 virtual bool CleanupStateForConsumer(GestureConsumer* consumer) = 0; |
51 | 50 |
52 // 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 |
53 // the touch is already associated with a target. | 52 // the touch is already associated with a target. |
54 // Otherwise, returns null. | 53 // Otherwise, returns null. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 92 |
94 // Unsubscribes |helper| from async gesture dispatch. | 93 // Unsubscribes |helper| from async gesture dispatch. |
95 // 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 |
96 // and must be cleaned up appropriately by the caller. | 95 // and must be cleaned up appropriately by the caller. |
97 virtual void RemoveGestureEventHelper(GestureEventHelper* helper) = 0; | 96 virtual void RemoveGestureEventHelper(GestureEventHelper* helper) = 0; |
98 }; | 97 }; |
99 | 98 |
100 } // namespace ui | 99 } // namespace ui |
101 | 100 |
102 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_H_ | 101 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_H_ |
OLD | NEW |