| 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_span_delta; |
| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 bool event_before_or_above_starting_gesture_event_; | 147 bool event_before_or_above_starting_gesture_event_; |
| 144 | 148 |
| 145 scoped_ptr<GestureDetector> gesture_detector_; | 149 scoped_ptr<GestureDetector> gesture_detector_; |
| 146 | 150 |
| 147 DISALLOW_COPY_AND_ASSIGN(ScaleGestureDetector); | 151 DISALLOW_COPY_AND_ASSIGN(ScaleGestureDetector); |
| 148 }; | 152 }; |
| 149 | 153 |
| 150 } // namespace ui | 154 } // namespace ui |
| 151 | 155 |
| 152 #endif // UI_EVENTS_GESTURE_DETECTION_SCALE_GESTURE_DETECTOR_H_ | 156 #endif // UI_EVENTS_GESTURE_DETECTION_SCALE_GESTURE_DETECTOR_H_ |
| OLD | NEW |