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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/timer.h" | 9 #include "base/timer.h" |
10 #include "ui/base/events.h" | 10 #include "ui/base/events.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // Do a linear scan through points_ to find the GesturePoint | 71 // Do a linear scan through points_ to find the GesturePoint |
72 // with id |point_id|. | 72 // with id |point_id|. |
73 GesturePoint* GetPointByPointId(int point_id); | 73 GesturePoint* GetPointByPointId(int point_id); |
74 | 74 |
75 bool IsSecondTouchDownCloseEnoughForTwoFingerTap(); | 75 bool IsSecondTouchDownCloseEnoughForTwoFingerTap(); |
76 | 76 |
77 // Functions to be called to add GestureEvents, after successful recognition. | 77 // Functions to be called to add GestureEvents, after successful recognition. |
78 | 78 |
79 // Tap gestures. | 79 // Tap gestures. |
80 void AppendTapDownGestureEvent(const GesturePoint& point, Gestures* gestures); | 80 void AppendTapDownGestureEvent(const GesturePoint& point, Gestures* gestures); |
81 void AppendTapUpGestureEvent(const GesturePoint& point, Gestures* gestures); | 81 void AppendBeginGestureEvent(const GesturePoint& point, Gestures* gestures); |
| 82 void AppendEndGestureEvent(const GesturePoint& point, Gestures* gestures); |
82 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures); | 83 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures); |
83 void AppendDoubleClickGestureEvent(const GesturePoint& point, | 84 void AppendDoubleClickGestureEvent(const GesturePoint& point, |
84 Gestures* gestures); | 85 Gestures* gestures); |
85 void AppendLongPressGestureEvent(); | 86 void AppendLongPressGestureEvent(); |
86 | 87 |
87 // Scroll gestures. | 88 // Scroll gestures. |
88 void AppendScrollGestureBegin(const GesturePoint& point, | 89 void AppendScrollGestureBegin(const GesturePoint& point, |
89 const gfx::Point& location, | 90 const gfx::Point& location, |
90 Gestures* gestures); | 91 Gestures* gestures); |
91 void AppendScrollGestureEnd(const GesturePoint& point, | 92 void AppendScrollGestureEnd(const GesturePoint& point, |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 int point_count_; | 195 int point_count_; |
195 | 196 |
196 GestureEventHelper* helper_; | 197 GestureEventHelper* helper_; |
197 | 198 |
198 DISALLOW_COPY_AND_ASSIGN(GestureSequence); | 199 DISALLOW_COPY_AND_ASSIGN(GestureSequence); |
199 }; | 200 }; |
200 | 201 |
201 } // namespace ui | 202 } // namespace ui |
202 | 203 |
203 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ | 204 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ |
OLD | NEW |