| 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 // Functions to be called to add GestureEvents, after succesful recognition. | 58 // Do a linear scan through points_ to find the GesturePoint |
| 59 // with id |point_id|. |
| 60 GesturePoint* GetPointByPointId(int point_id); |
| 61 |
| 62 // Functions to be called to add GestureEvents, after successful recognition. |
| 59 | 63 |
| 60 // Tap gestures. | 64 // Tap gestures. |
| 61 void AppendTapDownGestureEvent(const GesturePoint& point, Gestures* gestures); | 65 void AppendTapDownGestureEvent(const GesturePoint& point, Gestures* gestures); |
| 62 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures); | 66 void AppendClickGestureEvent(const GesturePoint& point, Gestures* gestures); |
| 63 void AppendDoubleClickGestureEvent(const GesturePoint& point, | 67 void AppendDoubleClickGestureEvent(const GesturePoint& point, |
| 64 Gestures* gestures); | 68 Gestures* gestures); |
| 65 void AppendLongPressGestureEvent(); | 69 void AppendLongPressGestureEvent(); |
| 66 | 70 |
| 67 // Scroll gestures. | 71 // Scroll gestures. |
| 68 void AppendScrollGestureBegin(const GesturePoint& point, | 72 void AppendScrollGestureBegin(const GesturePoint& point, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 150 |
| 147 GesturePoint points_[kMaxGesturePoints]; | 151 GesturePoint points_[kMaxGesturePoints]; |
| 148 int point_count_; | 152 int point_count_; |
| 149 | 153 |
| 150 DISALLOW_COPY_AND_ASSIGN(GestureSequence); | 154 DISALLOW_COPY_AND_ASSIGN(GestureSequence); |
| 151 }; | 155 }; |
| 152 | 156 |
| 153 } // namespace aura | 157 } // namespace aura |
| 154 | 158 |
| 155 #endif // UI_AURA_GESTURES_GESTURE_SEQUENCE_H_ | 159 #endif // UI_AURA_GESTURES_GESTURE_SEQUENCE_H_ |
| OLD | NEW |