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_BASE_GESTURES_GESTURE_SEQUENCE_H_ | 5 #ifndef UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ |
6 #define UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ | 6 #define UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ |
7 | 7 |
8 #include "base/timer.h" | 8 #include "base/timer.h" |
9 #include "ui/base/events/event_constants.h" | 9 #include "ui/base/events/event_constants.h" |
10 #include "ui/base/gestures/gesture_point.h" | 10 #include "ui/base/gestures/gesture_point.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 explicit GestureSequence(GestureEventHelper* consumer); | 39 explicit GestureSequence(GestureEventHelper* consumer); |
40 virtual ~GestureSequence(); | 40 virtual ~GestureSequence(); |
41 | 41 |
42 typedef GestureRecognizer::Gestures Gestures; | 42 typedef GestureRecognizer::Gestures Gestures; |
43 | 43 |
44 // Invoked for each touch event that could contribute to the current gesture. | 44 // Invoked for each touch event that could contribute to the current gesture. |
45 // Returns list of zero or more GestureEvents identified after processing | 45 // Returns list of zero or more GestureEvents identified after processing |
46 // TouchEvent. | 46 // TouchEvent. |
47 // Caller would be responsible for freeing up Gestures. | 47 // Caller would be responsible for freeing up Gestures. |
48 virtual Gestures* ProcessTouchEventForGesture(const TouchEvent& event, | 48 virtual Gestures* ProcessTouchEventForGesture(const TouchEvent& event, |
49 ui::TouchStatus status); | 49 EventResult status); |
50 const GesturePoint* points() const { return points_; } | 50 const GesturePoint* points() const { return points_; } |
51 int point_count() const { return point_count_; } | 51 int point_count() const { return point_count_; } |
52 | 52 |
53 const gfx::Point& last_touch_location() const { return last_touch_location_; } | 53 const gfx::Point& last_touch_location() const { return last_touch_location_; } |
54 | 54 |
55 protected: | 55 protected: |
56 virtual base::OneShotTimer<GestureSequence>* CreateTimer(); | 56 virtual base::OneShotTimer<GestureSequence>* CreateTimer(); |
57 base::OneShotTimer<GestureSequence>* long_press_timer() { | 57 base::OneShotTimer<GestureSequence>* long_press_timer() { |
58 return long_press_timer_.get(); | 58 return long_press_timer_.get(); |
59 } | 59 } |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 gfx::Point last_touch_location_; | 209 gfx::Point last_touch_location_; |
210 | 210 |
211 GestureEventHelper* helper_; | 211 GestureEventHelper* helper_; |
212 | 212 |
213 DISALLOW_COPY_AND_ASSIGN(GestureSequence); | 213 DISALLOW_COPY_AND_ASSIGN(GestureSequence); |
214 }; | 214 }; |
215 | 215 |
216 } // namespace ui | 216 } // namespace ui |
217 | 217 |
218 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ | 218 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ |
OLD | NEW |