Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_ | 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_ |
| 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_ | 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/events/gesture_detection/gesture_detection_export.h" | 10 #include "ui/events/gesture_detection/gesture_detection_export.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 private: | 150 private: |
| 151 void Init(const Config& config); | 151 void Init(const Config& config); |
| 152 void OnShowPressTimeout(); | 152 void OnShowPressTimeout(); |
| 153 void OnLongPressTimeout(); | 153 void OnLongPressTimeout(); |
| 154 void OnTapTimeout(); | 154 void OnTapTimeout(); |
| 155 void Cancel(); | 155 void Cancel(); |
| 156 void CancelTaps(); | 156 void CancelTaps(); |
| 157 bool IsConsideredDoubleTap(const MotionEvent& first_down, | 157 bool IsConsideredDoubleTap(const MotionEvent& first_down, |
| 158 const MotionEvent& first_up, | 158 const MotionEvent& first_up, |
| 159 const MotionEvent& second_down) const; | 159 const MotionEvent& second_down) const; |
| 160 bool handleSwipeIfNeeded(const MotionEvent& up, float vx, float vy); | |
|
jdduke (slow)
2014/05/26 21:19:42
Nit: handle -> Handle
mfomitchev
2014/05/26 22:07:14
Done.
| |
| 160 | 161 |
| 161 class TimeoutGestureHandler; | 162 class TimeoutGestureHandler; |
| 162 scoped_ptr<TimeoutGestureHandler> timeout_handler_; | 163 scoped_ptr<TimeoutGestureHandler> timeout_handler_; |
| 163 GestureListener* const listener_; | 164 GestureListener* const listener_; |
| 164 DoubleTapListener* double_tap_listener_; | 165 DoubleTapListener* double_tap_listener_; |
| 165 | 166 |
| 166 float touch_slop_square_; | 167 float touch_slop_square_; |
| 167 float double_tap_touch_slop_square_; | 168 float double_tap_touch_slop_square_; |
| 168 float double_tap_slop_square_; | 169 float double_tap_slop_square_; |
| 169 float two_finger_tap_distance_square_; | 170 float two_finger_tap_distance_square_; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 200 | 201 |
| 201 // Determines speed during touch scrolling. | 202 // Determines speed during touch scrolling. |
| 202 VelocityTrackerState velocity_tracker_; | 203 VelocityTrackerState velocity_tracker_; |
| 203 | 204 |
| 204 DISALLOW_COPY_AND_ASSIGN(GestureDetector); | 205 DISALLOW_COPY_AND_ASSIGN(GestureDetector); |
| 205 }; | 206 }; |
| 206 | 207 |
| 207 } // namespace ui | 208 } // namespace ui |
| 208 | 209 |
| 209 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_ | 210 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_ |
| OLD | NEW |