| 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_IMPL_H_ | 5 #ifndef UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ |
| 6 #define UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ | 6 #define UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 virtual GestureProviderAura* GetGestureProviderForConsumer( | 52 virtual GestureProviderAura* GetGestureProviderForConsumer( |
| 53 GestureConsumer* c); | 53 GestureConsumer* c); |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 // Sets up the target consumer for gestures based on the touch-event. | 56 // Sets up the target consumer for gestures based on the touch-event. |
| 57 void SetupTargets(const TouchEvent& event, GestureConsumer* consumer); | 57 void SetupTargets(const TouchEvent& event, GestureConsumer* consumer); |
| 58 | 58 |
| 59 void DispatchGestureEvent(GestureEvent* event); | 59 void DispatchGestureEvent(GestureEvent* event); |
| 60 | 60 |
| 61 // Overridden from GestureRecognizer | 61 // Overridden from GestureRecognizer |
| 62 virtual bool ProcessTouchEventPreDispatch(const TouchEvent& event, | 62 bool ProcessTouchEvent(const TouchEvent& event, |
| 63 GestureConsumer* consumer) override; | 63 GestureConsumer* consumer) override; |
| 64 | 64 |
| 65 virtual Gestures* ProcessTouchEventPostDispatch( | 65 Gestures* ProcessTouchEventAck(const TouchEvent& event, |
| 66 const TouchEvent& event, | 66 ui::EventResult result, |
| 67 ui::EventResult result, | 67 GestureConsumer* consumer) override; |
| 68 GestureConsumer* consumer) override; | |
| 69 | |
| 70 virtual Gestures* ProcessTouchEventOnAsyncAck( | |
| 71 const TouchEvent& event, | |
| 72 ui::EventResult result, | |
| 73 GestureConsumer* consumer) override; | |
| 74 | 68 |
| 75 virtual bool CleanupStateForConsumer(GestureConsumer* consumer) | 69 virtual bool CleanupStateForConsumer(GestureConsumer* consumer) |
| 76 override; | 70 override; |
| 77 virtual void AddGestureEventHelper(GestureEventHelper* helper) override; | 71 virtual void AddGestureEventHelper(GestureEventHelper* helper) override; |
| 78 virtual void RemoveGestureEventHelper(GestureEventHelper* helper) override; | 72 virtual void RemoveGestureEventHelper(GestureEventHelper* helper) override; |
| 79 | 73 |
| 80 // Overridden from GestureProviderAuraClient | 74 // Overridden from GestureProviderAuraClient |
| 81 virtual void OnGestureEvent(GestureEvent* event) override; | 75 virtual void OnGestureEvent(GestureEvent* event) override; |
| 82 | 76 |
| 83 // Convenience method to find the GestureEventHelper that can dispatch events | 77 // Convenience method to find the GestureEventHelper that can dispatch events |
| (...skipping 13 matching lines...) Expand all Loading... |
| 97 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImpl); | 91 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImpl); |
| 98 }; | 92 }; |
| 99 | 93 |
| 100 // Provided only for testing: | 94 // Provided only for testing: |
| 101 EVENTS_EXPORT void SetGestureRecognizerForTesting( | 95 EVENTS_EXPORT void SetGestureRecognizerForTesting( |
| 102 GestureRecognizer* gesture_recognizer); | 96 GestureRecognizer* gesture_recognizer); |
| 103 | 97 |
| 104 } // namespace ui | 98 } // namespace ui |
| 105 | 99 |
| 106 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ | 100 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ |
| OLD | NEW |