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

Side by Side Diff: ui/events/gestures/gesture_configuration.h

Issue 570633002: Remove unsupported parameters by the unified gesture detector from Gesture Configuration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/events/gestures/gesture_configuration.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_GESTURES_GESTURE_CONFIGURATION_H_ 5 #ifndef UI_EVENTS_GESTURES_GESTURE_CONFIGURATION_H_
6 #define UI_EVENTS_GESTURES_GESTURE_CONFIGURATION_H_ 6 #define UI_EVENTS_GESTURES_GESTURE_CONFIGURATION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ui/events/events_base_export.h" 9 #include "ui/events/events_base_export.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 static double semi_long_press_time_in_seconds() { 44 static double semi_long_press_time_in_seconds() {
45 return semi_long_press_time_in_seconds_; 45 return semi_long_press_time_in_seconds_;
46 } 46 }
47 static double max_distance_for_two_finger_tap_in_pixels() { 47 static double max_distance_for_two_finger_tap_in_pixels() {
48 return max_distance_for_two_finger_tap_in_pixels_; 48 return max_distance_for_two_finger_tap_in_pixels_;
49 } 49 }
50 static void set_max_distance_for_two_finger_tap_in_pixels(double val) { 50 static void set_max_distance_for_two_finger_tap_in_pixels(double val) {
51 max_distance_for_two_finger_tap_in_pixels_ = val; 51 max_distance_for_two_finger_tap_in_pixels_ = val;
52 } 52 }
53 static int max_radius() {
54 return max_radius_;
55 }
56 static void set_long_press_time_in_seconds(double val) { 53 static void set_long_press_time_in_seconds(double val) {
57 long_press_time_in_seconds_ = val; 54 long_press_time_in_seconds_ = val;
58 } 55 }
59 static void set_semi_long_press_time_in_seconds(double val) { 56 static void set_semi_long_press_time_in_seconds(double val) {
60 semi_long_press_time_in_seconds_ = val; 57 semi_long_press_time_in_seconds_ = val;
61 } 58 }
62 static double max_seconds_between_double_click() { 59 static double max_seconds_between_double_click() {
63 return max_seconds_between_double_click_; 60 return max_seconds_between_double_click_;
64 } 61 }
65 static void set_max_seconds_between_double_click(double val) { 62 static void set_max_seconds_between_double_click(double val) {
(...skipping 28 matching lines...) Expand all
94 } 91 }
95 static void set_max_distance_between_taps_for_double_tap(double val) { 92 static void set_max_distance_between_taps_for_double_tap(double val) {
96 max_distance_between_taps_for_double_tap_ = val; 93 max_distance_between_taps_for_double_tap_ = val;
97 } 94 }
98 static double min_distance_for_pinch_scroll_in_pixels() { 95 static double min_distance_for_pinch_scroll_in_pixels() {
99 return min_distance_for_pinch_scroll_in_pixels_; 96 return min_distance_for_pinch_scroll_in_pixels_;
100 } 97 }
101 static void set_min_distance_for_pinch_scroll_in_pixels(double val) { 98 static void set_min_distance_for_pinch_scroll_in_pixels(double val) {
102 min_distance_for_pinch_scroll_in_pixels_ = val; 99 min_distance_for_pinch_scroll_in_pixels_ = val;
103 } 100 }
104 static double min_flick_speed_squared() {
105 return min_flick_speed_squared_;
106 }
107 static void set_min_flick_speed_squared(double val) {
108 min_flick_speed_squared_ = val;
109 }
110 static double min_pinch_update_distance_in_pixels() { 101 static double min_pinch_update_distance_in_pixels() {
111 return min_pinch_update_distance_in_pixels_; 102 return min_pinch_update_distance_in_pixels_;
112 } 103 }
113 static void set_min_pinch_update_distance_in_pixels(double val) { 104 static void set_min_pinch_update_distance_in_pixels(double val) {
114 min_pinch_update_distance_in_pixels_ = val; 105 min_pinch_update_distance_in_pixels_ = val;
115 } 106 }
116 static double min_rail_break_velocity() {
117 return min_rail_break_velocity_;
118 }
119 static void set_min_rail_break_velocity(double val) {
120 min_rail_break_velocity_ = val;
121 }
122 static double min_scroll_delta_squared() {
123 return min_scroll_delta_squared_;
124 }
125 static void set_min_scroll_delta_squared(double val) {
126 min_scroll_delta_squared_ = val;
127 }
128 static float min_scroll_velocity() { 107 static float min_scroll_velocity() {
129 return min_scroll_velocity_; 108 return min_scroll_velocity_;
130 } 109 }
131 static void set_min_scroll_velocity(float val) { 110 static void set_min_scroll_velocity(float val) {
132 min_scroll_velocity_ = val; 111 min_scroll_velocity_ = val;
133 } 112 }
134 static double min_swipe_speed() { 113 static double min_swipe_speed() {
135 return min_swipe_speed_; 114 return min_swipe_speed_;
136 } 115 }
137 static void set_min_swipe_speed(double val) { 116 static void set_min_swipe_speed(double val) {
138 min_swipe_speed_ = val; 117 min_swipe_speed_ = val;
139 } 118 }
140 static double min_touch_down_duration_in_seconds_for_click() {
141 return min_touch_down_duration_in_seconds_for_click_;
142 }
143 static void set_min_touch_down_duration_in_seconds_for_click(double val) {
144 min_touch_down_duration_in_seconds_for_click_ = val;
145 }
146
147 static int min_scaling_span_in_pixels() { 119 static int min_scaling_span_in_pixels() {
148 return min_scaling_span_in_pixels_; 120 return min_scaling_span_in_pixels_;
149 }; 121 };
150
151 static void set_min_scaling_span_in_pixels(int val) { 122 static void set_min_scaling_span_in_pixels(int val) {
152 min_scaling_span_in_pixels_ = val; 123 min_scaling_span_in_pixels_ = val;
153 } 124 }
154
155 static int points_buffered_for_velocity() {
156 return points_buffered_for_velocity_;
157 }
158 static void set_points_buffered_for_velocity(int val) {
159 points_buffered_for_velocity_ = val;
160 }
161 static double rail_break_proportion() {
162 return rail_break_proportion_;
163 }
164 static void set_rail_break_proportion(double val) {
165 rail_break_proportion_ = val;
166 }
167 static double rail_start_proportion() {
168 return rail_start_proportion_;
169 }
170 static void set_rail_start_proportion(double val) {
171 rail_start_proportion_ = val;
172 }
173 static double scroll_prediction_seconds() {
174 return scroll_prediction_seconds_;
175 }
176 static void set_scroll_prediction_seconds(double val) {
177 scroll_prediction_seconds_ = val;
178 }
179 static int show_press_delay_in_ms() { 125 static int show_press_delay_in_ms() {
180 return show_press_delay_in_ms_; 126 return show_press_delay_in_ms_;
181 } 127 }
182 static int set_show_press_delay_in_ms(int val) { 128 static int set_show_press_delay_in_ms(int val) {
183 return show_press_delay_in_ms_ = val; 129 return show_press_delay_in_ms_ = val;
184 } 130 }
185 static int scroll_debounce_interval_in_ms() { 131 static int scroll_debounce_interval_in_ms() {
186 return scroll_debounce_interval_in_ms_; 132 return scroll_debounce_interval_in_ms_;
187 } 133 }
188 static int set_scroll_debounce_interval_in_ms(int val) { 134 static int set_scroll_debounce_interval_in_ms(int val) {
(...skipping 26 matching lines...) Expand all
215 161
216 // The default touch radius length used when the only information given 162 // The default touch radius length used when the only information given
217 // by the device is the touch center. 163 // by the device is the touch center.
218 static int default_radius_; 164 static int default_radius_;
219 165
220 // The maximum allowed distance between two fingers for a two finger tap. If 166 // The maximum allowed distance between two fingers for a two finger tap. If
221 // the distance between two fingers is greater than this value, we will not 167 // the distance between two fingers is greater than this value, we will not
222 // recognize a two finger tap. 168 // recognize a two finger tap.
223 static double max_distance_for_two_finger_tap_in_pixels_; 169 static double max_distance_for_two_finger_tap_in_pixels_;
224 170
225 // The maximum allowed size for the radius of a touch region used in
226 // forming an ET_GESTURE_TAP event.
227 static int max_radius_;
228
229 // Maximum time between a GestureFlingCancel and a mousedown such that the 171 // Maximum time between a GestureFlingCancel and a mousedown such that the
230 // mousedown is considered associated with the cancel event. 172 // mousedown is considered associated with the cancel event.
231 static int fling_max_cancel_to_down_time_in_ms_; 173 static int fling_max_cancel_to_down_time_in_ms_;
232 174
233 // Maxium time between a mousedown/mouseup pair that is considered to be a 175 // Maxium time between a mousedown/mouseup pair that is considered to be a
234 // suppressable tap. 176 // suppressable tap.
235 static int fling_max_tap_gap_time_in_ms_; 177 static int fling_max_tap_gap_time_in_ms_;
236 178
237 static double long_press_time_in_seconds_; 179 static double long_press_time_in_seconds_;
238 static double semi_long_press_time_in_seconds_; 180 static double semi_long_press_time_in_seconds_;
239 static double max_seconds_between_double_click_; 181 static double max_seconds_between_double_click_;
240 static double max_separation_for_gesture_touches_in_pixels_; 182 static double max_separation_for_gesture_touches_in_pixels_;
241 static float max_swipe_deviation_angle_; 183 static float max_swipe_deviation_angle_;
242 static double max_touch_down_duration_in_seconds_for_click_; 184 static double max_touch_down_duration_in_seconds_for_click_;
243 static double max_touch_move_in_pixels_for_click_; 185 static double max_touch_move_in_pixels_for_click_;
244 static double max_distance_between_taps_for_double_tap_; 186 static double max_distance_between_taps_for_double_tap_;
245 static double min_distance_for_pinch_scroll_in_pixels_; 187 static double min_distance_for_pinch_scroll_in_pixels_;
246 static double min_flick_speed_squared_;
247 // Only used with --compensate-for-unstable-pinch-zoom. 188 // Only used with --compensate-for-unstable-pinch-zoom.
248 static double min_pinch_update_distance_in_pixels_; 189 static double min_pinch_update_distance_in_pixels_;
249 static double min_rail_break_velocity_;
250 static double min_scroll_delta_squared_;
251 static float min_scroll_velocity_; 190 static float min_scroll_velocity_;
252 static double min_swipe_speed_; 191 static double min_swipe_speed_;
253 static double min_touch_down_duration_in_seconds_for_click_;
254 static int min_scaling_span_in_pixels_; 192 static int min_scaling_span_in_pixels_;
255 static int points_buffered_for_velocity_;
256 static double rail_break_proportion_;
257 static double rail_start_proportion_;
258 static double scroll_prediction_seconds_;
259 static int show_press_delay_in_ms_; 193 static int show_press_delay_in_ms_;
260 static int scroll_debounce_interval_in_ms_; 194 static int scroll_debounce_interval_in_ms_;
261
262 static float fling_acceleration_curve_coefficients_[NumAccelParams]; 195 static float fling_acceleration_curve_coefficients_[NumAccelParams];
263 static float fling_velocity_cap_; 196 static float fling_velocity_cap_;
264 // TODO(davemoore): Move into chrome/browser/ui. 197 // TODO(davemoore): Move into chrome/browser/ui.
265 static int tab_scrub_activation_delay_in_ms_; 198 static int tab_scrub_activation_delay_in_ms_;
266 199
267 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration); 200 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration);
268 }; 201 };
269 202
270 } // namespace ui 203 } // namespace ui
271 204
272 #endif // UI_EVENTS_GESTURES_GESTURE_CONFIGURATION_H_ 205 #endif // UI_EVENTS_GESTURES_GESTURE_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/events/gestures/gesture_configuration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698