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

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

Issue 1281553004: Disable tap suppression logic for WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
Patch Set: Created 5 years, 4 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_GESTURE_CONFIGURATION_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_CONFIGURATION_H_
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_CONFIGURATION_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_CONFIGURATION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ui/events/gesture_detection/gesture_detection_export.h" 9 #include "ui/events/gesture_detection/gesture_detection_export.h"
10 #include "ui/events/gesture_detection/velocity_tracker.h" 10 #include "ui/events/gesture_detection/velocity_tracker.h"
(...skipping 10 matching lines...) Expand all
21 // Ordered alphabetically ignoring underscores. 21 // Ordered alphabetically ignoring underscores.
22 float default_radius() const { return default_radius_; } 22 float default_radius() const { return default_radius_; }
23 void set_default_radius(float radius) { 23 void set_default_radius(float radius) {
24 default_radius_ = radius; 24 default_radius_ = radius;
25 min_scaling_touch_major_ = default_radius_ * 2; 25 min_scaling_touch_major_ = default_radius_ * 2;
26 min_gesture_bounds_length_ = default_radius_; 26 min_gesture_bounds_length_ = default_radius_;
27 } 27 }
28 bool double_tap_enabled() const { return double_tap_enabled_; } 28 bool double_tap_enabled() const { return double_tap_enabled_; }
29 void set_double_tap_enabled(bool enabled) { double_tap_enabled_ = enabled; } 29 void set_double_tap_enabled(bool enabled) { double_tap_enabled_ = enabled; }
30 int double_tap_timeout_in_ms() const { return double_tap_timeout_in_ms_; } 30 int double_tap_timeout_in_ms() const { return double_tap_timeout_in_ms_; }
31 bool fling_touchpad_tap_suppression_enabled() const {
32 return fling_touchpad_tap_suppression_enabled_;
33 }
34 void set_fling_touchpad_tap_suppression_enabled(bool enabled) {
35 fling_touchpad_tap_suppression_enabled_ = enabled;
36 }
37 bool fling_touchscreen_tap_suppression_enabled() const {
38 return fling_touchscreen_tap_suppression_enabled_;
39 }
40 void set_fling_touchscreen_tap_suppression_enabled(bool enabled) {
41 fling_touchscreen_tap_suppression_enabled_ = enabled;
42 }
31 int fling_max_cancel_to_down_time_in_ms() const { 43 int fling_max_cancel_to_down_time_in_ms() const {
32 return fling_max_cancel_to_down_time_in_ms_; 44 return fling_max_cancel_to_down_time_in_ms_;
33 } 45 }
34 void set_fling_max_cancel_to_down_time_in_ms(int val) { 46 void set_fling_max_cancel_to_down_time_in_ms(int val) {
35 fling_max_cancel_to_down_time_in_ms_ = val; 47 fling_max_cancel_to_down_time_in_ms_ = val;
36 } 48 }
37 int fling_max_tap_gap_time_in_ms() const { 49 int fling_max_tap_gap_time_in_ms() const {
38 return fling_max_tap_gap_time_in_ms_; 50 return fling_max_tap_gap_time_in_ms_;
39 } 51 }
40 void set_fling_max_tap_gap_time_in_ms(int val) { 52 void set_fling_max_tap_gap_time_in_ms(int val) {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // NOTE: Adding new configuration parameters requires initializing 201 // NOTE: Adding new configuration parameters requires initializing
190 // corresponding entries in aura_test_base.cc's SetUp(). 202 // corresponding entries in aura_test_base.cc's SetUp().
191 203
192 // The default touch radius length used when the only information given 204 // The default touch radius length used when the only information given
193 // by the device is the touch center. 205 // by the device is the touch center.
194 float default_radius_; 206 float default_radius_;
195 207
196 bool double_tap_enabled_; 208 bool double_tap_enabled_;
197 int double_tap_timeout_in_ms_; 209 int double_tap_timeout_in_ms_;
198 210
211 // Whether to suppress touchscreen/touchpad taps that occur during a fling (
212 // in particular, when such taps cancel the active fling).
213 bool fling_touchpad_tap_suppression_enabled_;
214 bool fling_touchscreen_tap_suppression_enabled_;
215
199 // Maximum time between a GestureFlingCancel and a mousedown such that the 216 // Maximum time between a GestureFlingCancel and a mousedown such that the
200 // mousedown is considered associated with the cancel event. 217 // mousedown is considered associated with the cancel event.
201 int fling_max_cancel_to_down_time_in_ms_; 218 int fling_max_cancel_to_down_time_in_ms_;
202 219
203 // Maxium time between a mousedown/mouseup pair that is considered to be a 220 // Maxium time between a mousedown/mouseup pair that is considered to be a
204 // suppressable tap. 221 // suppressable tap.
205 int fling_max_tap_gap_time_in_ms_; 222 int fling_max_tap_gap_time_in_ms_;
206 bool gesture_begin_end_types_enabled_; 223 bool gesture_begin_end_types_enabled_;
207 int long_press_time_in_ms_; 224 int long_press_time_in_ms_;
208 float max_distance_between_taps_for_double_tap_; 225 float max_distance_between_taps_for_double_tap_;
(...skipping 27 matching lines...) Expand all
236 int tab_scrub_activation_delay_in_ms_; 253 int tab_scrub_activation_delay_in_ms_;
237 bool two_finger_tap_enabled_; 254 bool two_finger_tap_enabled_;
238 VelocityTracker::Strategy velocity_tracker_strategy_; 255 VelocityTracker::Strategy velocity_tracker_strategy_;
239 256
240 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration); 257 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration);
241 }; 258 };
242 259
243 } // namespace ui 260 } // namespace ui
244 261
245 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_CONFIGURATION_H_ 262 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_CONFIGURATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698