Chromium Code Reviews| 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 <set> | |
|
tdresser
2014/08/15 14:22:05
Remove unnecessary include.
lanwei
2014/08/27 03:54:03
Done.
| |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
| 12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 13 #include "ui/events/event_constants.h" | 14 #include "ui/events/event_constants.h" |
| 14 #include "ui/events/events_export.h" | 15 #include "ui/events/events_export.h" |
| 15 #include "ui/events/gestures/gesture_provider_aura.h" | 16 #include "ui/events/gestures/gesture_provider_aura.h" |
| 16 #include "ui/events/gestures/gesture_recognizer.h" | 17 #include "ui/events/gestures/gesture_recognizer.h" |
| 17 #include "ui/events/gestures/gesture_sequence.h" | 18 #include "ui/events/gestures/gesture_sequence.h" |
| 18 #include "ui/gfx/point.h" | 19 #include "ui/gfx/point.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 protected: | 55 protected: |
| 55 virtual GestureSequence* GetGestureSequenceForConsumer(GestureConsumer* c); | 56 virtual GestureSequence* GetGestureSequenceForConsumer(GestureConsumer* c); |
| 56 virtual GestureProviderAura* GetGestureProviderForConsumer( | 57 virtual GestureProviderAura* GetGestureProviderForConsumer( |
| 57 GestureConsumer* c); | 58 GestureConsumer* c); |
| 58 virtual GestureSequence* CreateSequence( | 59 virtual GestureSequence* CreateSequence( |
| 59 ui::GestureSequenceDelegate* delegate); | 60 ui::GestureSequenceDelegate* delegate); |
| 60 | 61 |
| 61 private: | 62 private: |
| 62 // Sets up the target consumer for gestures based on the touch-event. | 63 // Sets up the target consumer for gestures based on the touch-event. |
| 63 void SetupTargets(const TouchEvent& event, GestureConsumer* consumer); | 64 void SetupTargets(const TouchEvent& event, GestureConsumer* consumer); |
| 64 void CancelTouches(std::vector<std::pair<int, GestureConsumer*> >* touches); | |
| 65 | 65 |
| 66 void DispatchGestureEvent(GestureEvent* event); | 66 void DispatchGestureEvent(GestureEvent* event); |
| 67 | 67 |
| 68 // Overridden from GestureRecognizer | 68 // Overridden from GestureRecognizer |
| 69 virtual bool ProcessTouchEventPreDispatch(const TouchEvent& event, | 69 virtual bool ProcessTouchEventPreDispatch(const TouchEvent& event, |
| 70 GestureConsumer* consumer) OVERRIDE; | 70 GestureConsumer* consumer) OVERRIDE; |
| 71 | 71 |
| 72 virtual Gestures* ProcessTouchEventPostDispatch( | 72 virtual Gestures* ProcessTouchEventPostDispatch( |
| 73 const TouchEvent& event, | 73 const TouchEvent& event, |
| 74 ui::EventResult result, | 74 ui::EventResult result, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImpl); | 111 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImpl); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 // Provided only for testing: | 114 // Provided only for testing: |
| 115 EVENTS_EXPORT void SetGestureRecognizerForTesting( | 115 EVENTS_EXPORT void SetGestureRecognizerForTesting( |
| 116 GestureRecognizer* gesture_recognizer); | 116 GestureRecognizer* gesture_recognizer); |
| 117 | 117 |
| 118 } // namespace ui | 118 } // namespace ui |
| 119 | 119 |
| 120 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ | 120 #endif // UI_EVENTS_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ |
| OLD | NEW |