Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: ui/events/gesture_detection/scale_gesture_detector.h

Issue 409563004: Fix gesture debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually add the changes... Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 Config(); 24 Config();
25 ~Config(); 25 ~Config();
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 to use touch major values when determining the scale span.
35 // Defaults to false.
36 bool use_touch_major_in_span;
37
38 // Whether double-tap drag scaling is enabled. 34 // Whether double-tap drag scaling is enabled.
39 bool quick_scale_enabled; 35 bool quick_scale_enabled;
40 36
41 // Minimum pinch span change before pinch occurs (in dips). See 37 // Minimum pinch span change before pinch occurs (in dips). See
42 // crbug.com/373318. 38 // crbug.com/373318.
43 float min_pinch_update_span_delta; 39 float min_pinch_update_span_delta;
44 }; 40 };
45 41
46 class ScaleGestureListener { 42 class ScaleGestureListener {
47 public: 43 public:
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 float curr_span_y_; 129 float curr_span_y_;
134 float prev_span_x_; 130 float prev_span_x_;
135 float prev_span_y_; 131 float prev_span_y_;
136 base::TimeTicks curr_time_; 132 base::TimeTicks curr_time_;
137 base::TimeTicks prev_time_; 133 base::TimeTicks prev_time_;
138 bool in_progress_; 134 bool in_progress_;
139 float span_slop_; 135 float span_slop_;
140 float min_span_; 136 float min_span_;
141 137
142 // Bounds for recently seen values. 138 // Bounds for recently seen values.
143 bool use_touch_major_in_span_;
144 float touch_upper_; 139 float touch_upper_;
145 float touch_lower_; 140 float touch_lower_;
146 float touch_history_last_accepted_; 141 float touch_history_last_accepted_;
147 int touch_history_direction_; 142 int touch_history_direction_;
148 base::TimeTicks touch_history_last_accepted_time_; 143 base::TimeTicks touch_history_last_accepted_time_;
149 float touch_min_major_; 144 float touch_min_major_;
150 float touch_max_major_; 145 float touch_max_major_;
151 float double_tap_focus_x_; 146 float double_tap_focus_x_;
152 float double_tap_focus_y_; 147 float double_tap_focus_y_;
153 DoubleTapMode double_tap_mode_; 148 DoubleTapMode double_tap_mode_;
154 149
155 bool event_before_or_above_starting_gesture_event_; 150 bool event_before_or_above_starting_gesture_event_;
156 151
157 scoped_ptr<GestureDetector> gesture_detector_; 152 scoped_ptr<GestureDetector> gesture_detector_;
158 153
159 DISALLOW_COPY_AND_ASSIGN(ScaleGestureDetector); 154 DISALLOW_COPY_AND_ASSIGN(ScaleGestureDetector);
160 }; 155 };
161 156
162 } // namespace ui 157 } // namespace ui
163 158
164 #endif // UI_EVENTS_GESTURE_DETECTION_SCALE_GESTURE_DETECTOR_H_ 159 #endif // UI_EVENTS_GESTURE_DETECTION_SCALE_GESTURE_DETECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698