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_AURA_GESTURES_GESTURE_SEQUENCE_H_ | 5 #ifndef UI_AURA_GESTURES_GESTURE_SEQUENCE_H_ |
6 #define UI_AURA_GESTURES_GESTURE_SEQUENCE_H_ | 6 #define UI_AURA_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/aura/gestures/gesture_point.h" | 10 #include "ui/aura/gestures/gesture_point.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 virtual base::OneShotTimer<GestureSequence>* CreateTimer(); | 48 virtual base::OneShotTimer<GestureSequence>* CreateTimer(); |
49 base::OneShotTimer<GestureSequence>* long_press_timer() { | 49 base::OneShotTimer<GestureSequence>* long_press_timer() { |
50 return long_press_timer_.get(); | 50 return long_press_timer_.get(); |
51 } | 51 } |
52 | 52 |
53 private: | 53 private: |
54 void Reset(); | 54 void Reset(); |
55 | 55 |
56 GesturePoint& GesturePointForEvent(const TouchEvent& event); | 56 GesturePoint& GesturePointForEvent(const TouchEvent& event); |
57 | 57 |
58 // Do a linear scan through points_ to find the GesturePoint | 58 // Functions to be called to add GestureEvents, after succesful recognition. |
59 // with id |point_id|. | |
60 GesturePoint* GetPointByPointId(int point_id); | |
61 | |
62 // Functions to be called to add GestureEvents, after successful recognition. | |
63 | 59 |
64 // Tap gestures. | 60 // Tap gestures. |
65 void AppendTapDownGestureEvent(const GesturePoint& point, Gestures* gestures); | 61 void AppendTapDownGestureEvent(const GesturePoint& point, Gestures* gestures); |
66 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures); | 62 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures); |
67 void AppendDoubleClickGestureEvent(const GesturePoint& point, | 63 void AppendDoubleClickGestureEvent(const GesturePoint& point, |
68 Gestures* gestures); | 64 Gestures* gestures); |
69 void AppendLongPressGestureEvent(); | 65 void AppendLongPressGestureEvent(); |
70 | 66 |
71 // Scroll gestures. | 67 // Scroll gestures. |
72 void AppendScrollGestureBegin(const GesturePoint& point, | 68 void AppendScrollGestureBegin(const GesturePoint& point, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 int point_count_; | 148 int point_count_; |
153 | 149 |
154 RootWindow* root_window_; | 150 RootWindow* root_window_; |
155 | 151 |
156 DISALLOW_COPY_AND_ASSIGN(GestureSequence); | 152 DISALLOW_COPY_AND_ASSIGN(GestureSequence); |
157 }; | 153 }; |
158 | 154 |
159 } // namespace aura | 155 } // namespace aura |
160 | 156 |
161 #endif // UI_AURA_GESTURES_GESTURE_SEQUENCE_H_ | 157 #endif // UI_AURA_GESTURES_GESTURE_SEQUENCE_H_ |
OLD | NEW |