| 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_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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 void set_max_distance_between_taps_for_double_tap(float val) { | 66 void set_max_distance_between_taps_for_double_tap(float val) { |
| 67 max_distance_between_taps_for_double_tap_ = val; | 67 max_distance_between_taps_for_double_tap_ = val; |
| 68 } | 68 } |
| 69 float max_distance_for_two_finger_tap_in_pixels() const { | 69 float max_distance_for_two_finger_tap_in_pixels() const { |
| 70 return max_distance_for_two_finger_tap_in_pixels_; | 70 return max_distance_for_two_finger_tap_in_pixels_; |
| 71 } | 71 } |
| 72 void set_max_distance_for_two_finger_tap_in_pixels(float val) { | 72 void set_max_distance_for_two_finger_tap_in_pixels(float val) { |
| 73 max_distance_for_two_finger_tap_in_pixels_ = val; | 73 max_distance_for_two_finger_tap_in_pixels_ = val; |
| 74 } | 74 } |
| 75 int max_tap_count() const { return max_tap_count_; } |
| 76 void set_max_tap_count(int count) { max_tap_count_ = count; } |
| 75 float max_fling_velocity() const { return max_fling_velocity_; } | 77 float max_fling_velocity() const { return max_fling_velocity_; } |
| 76 void set_max_fling_velocity(float val) { max_fling_velocity_ = val; } | 78 void set_max_fling_velocity(float val) { max_fling_velocity_ = val; } |
| 77 float max_gesture_bounds_length() const { | 79 float max_gesture_bounds_length() const { |
| 78 return max_gesture_bounds_length_; | 80 return max_gesture_bounds_length_; |
| 79 } | 81 } |
| 80 void set_max_gesture_bounds_length(float val) { | 82 void set_max_gesture_bounds_length(float val) { |
| 81 max_gesture_bounds_length_ = val; | 83 max_gesture_bounds_length_ = val; |
| 82 } | 84 } |
| 83 float max_separation_for_gesture_touches_in_pixels() const { | 85 float max_separation_for_gesture_touches_in_pixels() const { |
| 84 return max_separation_for_gesture_touches_in_pixels_; | 86 return max_separation_for_gesture_touches_in_pixels_; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 // mousedown is considered associated with the cancel event. | 219 // mousedown is considered associated with the cancel event. |
| 218 int fling_max_cancel_to_down_time_in_ms_; | 220 int fling_max_cancel_to_down_time_in_ms_; |
| 219 | 221 |
| 220 // Maxium time between a mousedown/mouseup pair that is considered to be a | 222 // Maxium time between a mousedown/mouseup pair that is considered to be a |
| 221 // suppressable tap. | 223 // suppressable tap. |
| 222 int fling_max_tap_gap_time_in_ms_; | 224 int fling_max_tap_gap_time_in_ms_; |
| 223 bool gesture_begin_end_types_enabled_; | 225 bool gesture_begin_end_types_enabled_; |
| 224 int long_press_time_in_ms_; | 226 int long_press_time_in_ms_; |
| 225 float max_distance_between_taps_for_double_tap_; | 227 float max_distance_between_taps_for_double_tap_; |
| 226 | 228 |
| 229 // The max length of a repeated tap sequence, e.g., to support double-click |
| 230 // only this is 2, to support triple-click it's 3. |
| 231 int max_tap_count_; |
| 232 |
| 227 // The maximum allowed distance between two fingers for a two finger tap. If | 233 // The maximum allowed distance between two fingers for a two finger tap. If |
| 228 // the distance between two fingers is greater than this value, we will not | 234 // the distance between two fingers is greater than this value, we will not |
| 229 // recognize a two finger tap. | 235 // recognize a two finger tap. |
| 230 float max_distance_for_two_finger_tap_in_pixels_; | 236 float max_distance_for_two_finger_tap_in_pixels_; |
| 231 float max_fling_velocity_; | 237 float max_fling_velocity_; |
| 232 float max_gesture_bounds_length_; | 238 float max_gesture_bounds_length_; |
| 233 float max_separation_for_gesture_touches_in_pixels_; | 239 float max_separation_for_gesture_touches_in_pixels_; |
| 234 float max_swipe_deviation_angle_; | 240 float max_swipe_deviation_angle_; |
| 235 int max_time_between_double_click_in_ms_; | 241 int max_time_between_double_click_in_ms_; |
| 236 int max_touch_down_duration_for_click_in_ms_; | 242 int max_touch_down_duration_for_click_in_ms_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 253 int tab_scrub_activation_delay_in_ms_; | 259 int tab_scrub_activation_delay_in_ms_; |
| 254 bool two_finger_tap_enabled_; | 260 bool two_finger_tap_enabled_; |
| 255 VelocityTracker::Strategy velocity_tracker_strategy_; | 261 VelocityTracker::Strategy velocity_tracker_strategy_; |
| 256 | 262 |
| 257 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration); | 263 DISALLOW_COPY_AND_ASSIGN(GestureConfiguration); |
| 258 }; | 264 }; |
| 259 | 265 |
| 260 } // namespace ui | 266 } // namespace ui |
| 261 | 267 |
| 262 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_CONFIGURATION_H_ | 268 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_CONFIGURATION_H_ |
| OLD | NEW |