| 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 AppendBeginGestureEvent(const GesturePoint& point, Gestures* gestures); | 81 void AppendTapUpGestureEvent(const GesturePoint& point, Gestures* gestures); |
| 82 void AppendEndGestureEvent(const GesturePoint& point, Gestures* gestures); | |
| 83 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures); | 82 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures); |
| 84 void AppendDoubleClickGestureEvent(const GesturePoint& point, | 83 void AppendDoubleClickGestureEvent(const GesturePoint& point, |
| 85 Gestures* gestures); | 84 Gestures* gestures); |
| 86 void AppendLongPressGestureEvent(); | 85 void AppendLongPressGestureEvent(); |
| 87 | 86 |
| 88 // Scroll gestures. | 87 // Scroll gestures. |
| 89 void AppendScrollGestureBegin(const GesturePoint& point, | 88 void AppendScrollGestureBegin(const GesturePoint& point, |
| 90 const gfx::Point& location, | 89 const gfx::Point& location, |
| 91 Gestures* gestures); | 90 Gestures* gestures); |
| 92 void AppendScrollGestureEnd(const GesturePoint& point, | 91 void AppendScrollGestureEnd(const GesturePoint& point, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 int point_count_; | 194 int point_count_; |
| 196 | 195 |
| 197 GestureEventHelper* helper_; | 196 GestureEventHelper* helper_; |
| 198 | 197 |
| 199 DISALLOW_COPY_AND_ASSIGN(GestureSequence); | 198 DISALLOW_COPY_AND_ASSIGN(GestureSequence); |
| 200 }; | 199 }; |
| 201 | 200 |
| 202 } // namespace ui | 201 } // namespace ui |
| 203 | 202 |
| 204 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ | 203 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ |
| OLD | NEW |