| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Whether |OnTwoFingerTap| should be called for two finger tap | 62 // Whether |OnTwoFingerTap| should be called for two finger tap |
| 63 // gestures. Defaults to false. | 63 // gestures. Defaults to false. |
| 64 bool two_finger_tap_enabled; | 64 bool two_finger_tap_enabled; |
| 65 | 65 |
| 66 // Maximum distance between pointers for a two finger tap. | 66 // Maximum distance between pointers for a two finger tap. |
| 67 float two_finger_tap_max_separation; | 67 float two_finger_tap_max_separation; |
| 68 | 68 |
| 69 // Maximum time the second pointer can be active for a two finger tap. | 69 // Maximum time the second pointer can be active for a two finger tap. |
| 70 base::TimeDelta two_finger_tap_timeout; | 70 base::TimeDelta two_finger_tap_timeout; |
| 71 |
| 72 VelocityTracker::Strategy velocity_tracker_strategy; |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 GestureDetector(const Config& config, | 75 GestureDetector(const Config& config, |
| 74 GestureListener* listener, | 76 GestureListener* listener, |
| 75 DoubleTapListener* optional_double_tap_listener); | 77 DoubleTapListener* optional_double_tap_listener); |
| 76 ~GestureDetector(); | 78 ~GestureDetector(); |
| 77 | 79 |
| 78 bool OnTouchEvent(const MotionEvent& ev); | 80 bool OnTouchEvent(const MotionEvent& ev); |
| 79 | 81 |
| 80 // Setting a valid |double_tap_listener| will enable double-tap detection, | 82 // Setting a valid |double_tap_listener| will enable double-tap detection, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 146 |
| 145 // Determines speed during touch scrolling. | 147 // Determines speed during touch scrolling. |
| 146 VelocityTrackerState velocity_tracker_; | 148 VelocityTrackerState velocity_tracker_; |
| 147 | 149 |
| 148 DISALLOW_COPY_AND_ASSIGN(GestureDetector); | 150 DISALLOW_COPY_AND_ASSIGN(GestureDetector); |
| 149 }; | 151 }; |
| 150 | 152 |
| 151 } // namespace ui | 153 } // namespace ui |
| 152 | 154 |
| 153 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_ | 155 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_ |
| OLD | NEW |