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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 GestureEventQueue::Config config; | 63 GestureEventQueue::Config config; |
64 | 64 |
65 config.touchscreen_tap_suppression_config.enabled = true; | 65 config.touchscreen_tap_suppression_config.enabled = true; |
66 config.touchscreen_tap_suppression_config.max_cancel_to_down_time = | 66 config.touchscreen_tap_suppression_config.max_cancel_to_down_time = |
67 base::TimeDelta::FromMilliseconds( | 67 base::TimeDelta::FromMilliseconds( |
68 gfx::ViewConfiguration::GetTapTimeoutInMs()); | 68 gfx::ViewConfiguration::GetTapTimeoutInMs()); |
69 config.touchscreen_tap_suppression_config.max_tap_gap_time = | 69 config.touchscreen_tap_suppression_config.max_tap_gap_time = |
70 base::TimeDelta::FromMilliseconds( | 70 base::TimeDelta::FromMilliseconds( |
71 gfx::ViewConfiguration::GetLongPressTimeoutInMs()); | 71 gfx::ViewConfiguration::GetLongPressTimeoutInMs()); |
72 | 72 |
| 73 // Android WebView may handle root layer flings itself, which prevents |
| 74 // accurate fling cancel filtering (see |RenderWidgetCompositor::Initialize|). |
| 75 // TODO(jdduke): Remove this exception when the WebView fling architecture |
| 76 // is unified with the rest of Chrome, crbug.com/378984. |
| 77 config.enable_fling_cancel_filtering = false; |
| 78 |
73 return config; | 79 return config; |
74 } | 80 } |
75 | 81 |
76 TouchEventQueue::Config GetTouchEventQueueConfig() { | 82 TouchEventQueue::Config GetTouchEventQueueConfig() { |
77 TouchEventQueue::Config config; | 83 TouchEventQueue::Config config; |
78 | 84 |
79 config.touch_ack_timeout_delay = | 85 config.touch_ack_timeout_delay = |
80 base::TimeDelta::FromMilliseconds(kTouchAckTimeoutDelayMs); | 86 base::TimeDelta::FromMilliseconds(kTouchAckTimeoutDelayMs); |
81 config.touch_ack_timeout_supported = true; | 87 config.touch_ack_timeout_supported = true; |
82 | 88 |
(...skipping 15 matching lines...) Expand all Loading... |
98 } // namespace | 104 } // namespace |
99 | 105 |
100 InputRouterImpl::Config GetInputRouterConfigForPlatform() { | 106 InputRouterImpl::Config GetInputRouterConfigForPlatform() { |
101 InputRouterImpl::Config config; | 107 InputRouterImpl::Config config; |
102 config.gesture_config = GetGestureEventQueueConfig(); | 108 config.gesture_config = GetGestureEventQueueConfig(); |
103 config.touch_config = GetTouchEventQueueConfig(); | 109 config.touch_config = GetTouchEventQueueConfig(); |
104 return config; | 110 return config; |
105 } | 111 } |
106 | 112 |
107 } // namespace content | 113 } // namespace content |
OLD | NEW |