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 #include "content/browser/renderer_host/input/input_router_config_helper.h" | 5 #include "content/browser/renderer_host/input/input_router_config_helper.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/public/common/content_switches.h" | 8 #include "content/public/common/content_switches.h" |
9 #include "ui/events/gesture_detection/gesture_detector.h" | 9 #include "ui/events/gesture_detection/gesture_detector.h" |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 ui::GestureConfiguration::fling_max_tap_gap_time_in_ms() * 1000)); | 53 ui::GestureConfiguration::fling_max_tap_gap_time_in_ms() * 1000)); |
54 | 54 |
55 return config; | 55 return config; |
56 } | 56 } |
57 | 57 |
58 TouchEventQueue::Config GetTouchEventQueueConfig() { | 58 TouchEventQueue::Config GetTouchEventQueueConfig() { |
59 TouchEventQueue::Config config; | 59 TouchEventQueue::Config config; |
60 | 60 |
61 config.touchmove_slop_suppression_length_dips = | 61 config.touchmove_slop_suppression_length_dips = |
62 ui::GestureConfiguration::max_touch_move_in_pixels_for_click(); | 62 ui::GestureConfiguration::max_touch_move_in_pixels_for_click(); |
| 63 // TODO(jdduke): Remove when unified GR enabled, crbug.com/332418. |
| 64 config.touchmove_slop_suppression_region_includes_boundary = false; |
63 | 65 |
64 return config; | 66 return config; |
65 } | 67 } |
66 | 68 |
67 #elif defined(OS_ANDROID) | 69 #elif defined(OS_ANDROID) |
68 | 70 |
69 // Default time allowance for the touch ack delay before the touch sequence is | 71 // Default time allowance for the touch ack delay before the touch sequence is |
70 // cancelled. | 72 // cancelled. |
71 const int kTouchAckTimeoutDelayMs = 200; | 73 const int kTouchAckTimeoutDelayMs = 200; |
72 | 74 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 137 |
136 InputRouterImpl::Config GetInputRouterConfigForPlatform() { | 138 InputRouterImpl::Config GetInputRouterConfigForPlatform() { |
137 InputRouterImpl::Config config; | 139 InputRouterImpl::Config config; |
138 config.gesture_config = GetGestureEventQueueConfig(); | 140 config.gesture_config = GetGestureEventQueueConfig(); |
139 config.touch_config = GetTouchEventQueueConfig(); | 141 config.touch_config = GetTouchEventQueueConfig(); |
140 config.touch_config.touch_scrolling_mode = GetTouchScrollingMode(); | 142 config.touch_config.touch_scrolling_mode = GetTouchScrollingMode(); |
141 return config; | 143 return config; |
142 } | 144 } |
143 | 145 |
144 } // namespace content | 146 } // namespace content |
OLD | NEW |