| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Invoked before event dispatch. If the event is invalid given the current | 31 // Invoked before event dispatch. If the event is invalid given the current |
| 32 // touch sequence, returns false. | 32 // touch sequence, returns false. |
| 33 virtual bool ProcessTouchEventPreDispatch(TouchEvent* event, | 33 virtual bool ProcessTouchEventPreDispatch(TouchEvent* event, |
| 34 GestureConsumer* consumer) = 0; | 34 GestureConsumer* consumer) = 0; |
| 35 | 35 |
| 36 // Returns a list of zero or more GestureEvents. Acks the gesture packet in | 36 // Returns a list of zero or more GestureEvents. Acks the gesture packet in |
| 37 // the queue which matches with unique_event_id. | 37 // the queue which matches with unique_event_id. |
| 38 virtual Gestures AckTouchEvent(uint32_t unique_event_id, | 38 virtual Gestures AckTouchEvent(uint32_t unique_event_id, |
| 39 ui::EventResult result, | 39 ui::EventResult result, |
| 40 bool is_source_touch_event_set_non_blocking, |
| 40 GestureConsumer* consumer) = 0; | 41 GestureConsumer* consumer) = 0; |
| 41 | 42 |
| 42 // This is called when the consumer is destroyed. So this should cleanup any | 43 // This is called when the consumer is destroyed. So this should cleanup any |
| 43 // internal state maintained for |consumer|. Returns true iff there was | 44 // internal state maintained for |consumer|. Returns true iff there was |
| 44 // state relating to |consumer| to clean up. | 45 // state relating to |consumer| to clean up. |
| 45 virtual bool CleanupStateForConsumer(GestureConsumer* consumer) = 0; | 46 virtual bool CleanupStateForConsumer(GestureConsumer* consumer) = 0; |
| 46 | 47 |
| 47 // Return the window which should handle this TouchEvent, in the case where | 48 // Return the window which should handle this TouchEvent, in the case where |
| 48 // the touch is already associated with a target. | 49 // the touch is already associated with a target. |
| 49 // Otherwise, returns null. | 50 // Otherwise, returns null. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 89 |
| 89 // Unsubscribes |helper| from async gesture dispatch. | 90 // Unsubscribes |helper| from async gesture dispatch. |
| 90 // Since the GestureRecognizer does not own the |helper|, it is not deleted | 91 // Since the GestureRecognizer does not own the |helper|, it is not deleted |
| 91 // and must be cleaned up appropriately by the caller. | 92 // and must be cleaned up appropriately by the caller. |
| 92 virtual void RemoveGestureEventHelper(GestureEventHelper* helper) = 0; | 93 virtual void RemoveGestureEventHelper(GestureEventHelper* helper) = 0; |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace ui | 96 } // namespace ui |
| 96 | 97 |
| 97 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_H_ | 98 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_H_ |
| OLD | NEW |