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_TYPES_H_ | 5 #ifndef UI_EVENTS_GESTURES_GESTURE_TYPES_H_ |
6 #define UI_EVENTS_GESTURES_GESTURE_TYPES_H_ | 6 #define UI_EVENTS_GESTURES_GESTURE_TYPES_H_ |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
10 #include "ui/events/events_export.h" | 10 #include "ui/events/events_export.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 196 |
197 // An abstract type for consumers of gesture-events created by the | 197 // An abstract type for consumers of gesture-events created by the |
198 // gesture-recognizer. | 198 // gesture-recognizer. |
199 class EVENTS_EXPORT GestureConsumer { | 199 class EVENTS_EXPORT GestureConsumer { |
200 public: | 200 public: |
201 virtual ~GestureConsumer() {} | 201 virtual ~GestureConsumer() {} |
202 }; | 202 }; |
203 | 203 |
204 // GestureEventHelper creates implementation-specific gesture events and | 204 // GestureEventHelper creates implementation-specific gesture events and |
205 // can dispatch them. | 205 // can dispatch them. |
| 206 // TODO - check if this is necessary. |
206 class EVENTS_EXPORT GestureEventHelper { | 207 class EVENTS_EXPORT GestureEventHelper { |
207 public: | 208 public: |
208 virtual ~GestureEventHelper() { | 209 virtual ~GestureEventHelper() { |
209 } | 210 } |
210 | 211 |
211 // Returns true if this helper can dispatch events to |consumer|. | 212 // Returns true if this helper can dispatch events to |consumer|. |
212 virtual bool CanDispatchToConsumer(GestureConsumer* consumer) = 0; | 213 virtual bool CanDispatchToConsumer(GestureConsumer* consumer) = 0; |
213 virtual void DispatchPostponedGestureEvent(GestureEvent* event) = 0; | |
214 virtual void DispatchCancelTouchEvent(TouchEvent* event) = 0; | 214 virtual void DispatchCancelTouchEvent(TouchEvent* event) = 0; |
215 }; | 215 }; |
216 | 216 |
217 } // namespace ui | 217 } // namespace ui |
218 | 218 |
219 #endif // UI_EVENTS_GESTURES_GESTURE_TYPES_H_ | 219 #endif // UI_EVENTS_GESTURES_GESTURE_TYPES_H_ |
OLD | NEW |