| 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.h" | 9 #include "ui/base/events.h" |
| 10 #include "ui/base/gestures/gesture_point.h" | 10 #include "ui/base/gestures/gesture_point.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 void Reset(); | |
| 63 | |
| 64 // Recreates the axis-aligned bounding box that contains all the touch-points | 62 // Recreates the axis-aligned bounding box that contains all the touch-points |
| 65 // at their most recent position. | 63 // at their most recent position. |
| 66 void RecreateBoundingBox(); | 64 void RecreateBoundingBox(); |
| 67 | 65 |
| 68 void ResetVelocities(); | 66 void ResetVelocities(); |
| 69 | 67 |
| 70 GesturePoint& GesturePointForEvent(const TouchEvent& event); | 68 GesturePoint& GesturePointForEvent(const TouchEvent& event); |
| 71 | 69 |
| 72 // Do a linear scan through points_ to find the GesturePoint | 70 // Do a linear scan through points_ to find the GesturePoint |
| 73 // with id |point_id|. | 71 // with id |point_id|. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 Gestures* gestures); | 135 Gestures* gestures); |
| 138 bool ScrollStart(const TouchEvent& event, | 136 bool ScrollStart(const TouchEvent& event, |
| 139 GesturePoint& point, | 137 GesturePoint& point, |
| 140 Gestures* gestures); | 138 Gestures* gestures); |
| 141 void BreakRailScroll(const TouchEvent& event, | 139 void BreakRailScroll(const TouchEvent& event, |
| 142 GesturePoint& point, | 140 GesturePoint& point, |
| 143 Gestures* gestures); | 141 Gestures* gestures); |
| 144 bool ScrollUpdate(const TouchEvent& event, | 142 bool ScrollUpdate(const TouchEvent& event, |
| 145 const GesturePoint& point, | 143 const GesturePoint& point, |
| 146 Gestures* gestures); | 144 Gestures* gestures); |
| 147 bool NoGesture(const TouchEvent& event, | |
| 148 const GesturePoint& point, | |
| 149 Gestures* gestures); | |
| 150 bool TouchDown(const TouchEvent& event, | 145 bool TouchDown(const TouchEvent& event, |
| 151 const GesturePoint& point, | 146 const GesturePoint& point, |
| 152 Gestures* gestures); | 147 Gestures* gestures); |
| 153 bool TwoFingerTouchDown(const TouchEvent& event, | 148 bool TwoFingerTouchDown(const TouchEvent& event, |
| 154 const GesturePoint& point, | 149 const GesturePoint& point, |
| 155 Gestures* gestures); | 150 Gestures* gestures); |
| 156 bool TwoFingerTouchMove(const TouchEvent& event, | 151 bool TwoFingerTouchMove(const TouchEvent& event, |
| 157 const GesturePoint& point, | 152 const GesturePoint& point, |
| 158 Gestures* gestures); | 153 Gestures* gestures); |
| 159 bool TwoFingerTouchReleased(const TouchEvent& event, | 154 bool TwoFingerTouchReleased(const TouchEvent& event, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 gfx::Point last_touch_location_; | 207 gfx::Point last_touch_location_; |
| 213 | 208 |
| 214 GestureEventHelper* helper_; | 209 GestureEventHelper* helper_; |
| 215 | 210 |
| 216 DISALLOW_COPY_AND_ASSIGN(GestureSequence); | 211 DISALLOW_COPY_AND_ASSIGN(GestureSequence); |
| 217 }; | 212 }; |
| 218 | 213 |
| 219 } // namespace ui | 214 } // namespace ui |
| 220 | 215 |
| 221 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ | 216 #endif // UI_BASE_GESTURES_GESTURE_SEQUENCE_H_ |
| OLD | NEW |