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_SCALE_GESTURE_DETECTOR_H_ | 5 #ifndef UI_EVENTS_GESTURE_DETECTION_SCALE_GESTURE_DETECTOR_H_ |
| 6 #define UI_EVENTS_GESTURE_DETECTION_SCALE_GESTURE_DETECTOR_H_ | 6 #define UI_EVENTS_GESTURE_DETECTION_SCALE_GESTURE_DETECTOR_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "ui/events/gesture_detection/gesture_detection_export.h" | 10 #include "ui/events/gesture_detection/gesture_detection_export.h" |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 GestureDetector::Config gesture_detector_config; | 26 GestureDetector::Config gesture_detector_config; |
| 27 | 27 |
| 28 // Minimum accepted value for TouchMajor while scaling (in dips). | 28 // Minimum accepted value for TouchMajor while scaling (in dips). |
| 29 float min_scaling_touch_major; | 29 float min_scaling_touch_major; |
| 30 | 30 |
| 31 // Minimum span needed to initiate a scaling gesture (in dips). | 31 // Minimum span needed to initiate a scaling gesture (in dips). |
| 32 float min_scaling_span; | 32 float min_scaling_span; |
| 33 | 33 |
| 34 // Whether double-tap drag scaling is enabled. | 34 // Whether double-tap drag scaling is enabled. |
| 35 bool quick_scale_enabled; | 35 bool quick_scale_enabled; |
| 36 | |
| 37 // Minimum pinch span change before pinch occurs (in dips). See | |
| 38 // crbug.com/373318. | |
| 39 float min_pinch_update_distance; | |
|
jdduke (slow)
2014/05/21 19:30:37
Maybe call this |min_pinch_update_span_delta|?
tdresser
2014/05/22 12:31:44
Done.
| |
| 36 }; | 40 }; |
| 37 | 41 |
| 38 class ScaleGestureListener { | 42 class ScaleGestureListener { |
| 39 public: | 43 public: |
| 40 virtual ~ScaleGestureListener() {} | 44 virtual ~ScaleGestureListener() {} |
| 41 virtual bool OnScale(const ScaleGestureDetector& detector, | 45 virtual bool OnScale(const ScaleGestureDetector& detector, |
| 42 const MotionEvent& e) = 0; | 46 const MotionEvent& e) = 0; |
| 43 virtual bool OnScaleBegin(const ScaleGestureDetector& detector, | 47 virtual bool OnScaleBegin(const ScaleGestureDetector& detector, |
| 44 const MotionEvent& e) = 0; | 48 const MotionEvent& e) = 0; |
| 45 virtual void OnScaleEnd(const ScaleGestureDetector& detector, | 49 virtual void OnScaleEnd(const ScaleGestureDetector& detector, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 float touch_upper_; | 137 float touch_upper_; |
| 134 float touch_lower_; | 138 float touch_lower_; |
| 135 float touch_history_last_accepted_; | 139 float touch_history_last_accepted_; |
| 136 int touch_history_direction_; | 140 int touch_history_direction_; |
| 137 base::TimeTicks touch_history_last_accepted_time_; | 141 base::TimeTicks touch_history_last_accepted_time_; |
| 138 float touch_min_major_; | 142 float touch_min_major_; |
| 139 float double_tap_focus_x_; | 143 float double_tap_focus_x_; |
| 140 float double_tap_focus_y_; | 144 float double_tap_focus_y_; |
| 141 DoubleTapMode double_tap_mode_; | 145 DoubleTapMode double_tap_mode_; |
| 142 | 146 |
| 147 float min_pinch_update_distance_; | |
| 148 | |
| 143 bool event_before_or_above_starting_gesture_event_; | 149 bool event_before_or_above_starting_gesture_event_; |
| 144 | 150 |
| 145 scoped_ptr<GestureDetector> gesture_detector_; | 151 scoped_ptr<GestureDetector> gesture_detector_; |
| 146 | 152 |
| 147 DISALLOW_COPY_AND_ASSIGN(ScaleGestureDetector); | 153 DISALLOW_COPY_AND_ASSIGN(ScaleGestureDetector); |
| 148 }; | 154 }; |
| 149 | 155 |
| 150 } // namespace ui | 156 } // namespace ui |
| 151 | 157 |
| 152 #endif // UI_EVENTS_GESTURE_DETECTION_SCALE_GESTURE_DETECTOR_H_ | 158 #endif // UI_EVENTS_GESTURE_DETECTION_SCALE_GESTURE_DETECTOR_H_ |
| OLD | NEW |