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 | |
79 return config; | 73 return config; |
80 } | 74 } |
81 | 75 |
82 TouchEventQueue::Config GetTouchEventQueueConfig() { | 76 TouchEventQueue::Config GetTouchEventQueueConfig() { |
83 TouchEventQueue::Config config; | 77 TouchEventQueue::Config config; |
84 | 78 |
85 config.touch_ack_timeout_delay = | 79 config.touch_ack_timeout_delay = |
86 base::TimeDelta::FromMilliseconds(kTouchAckTimeoutDelayMs); | 80 base::TimeDelta::FromMilliseconds(kTouchAckTimeoutDelayMs); |
87 config.touch_ack_timeout_supported = true; | 81 config.touch_ack_timeout_supported = true; |
88 | 82 |
(...skipping 15 matching lines...) Expand all Loading... |
104 } // namespace | 98 } // namespace |
105 | 99 |
106 InputRouterImpl::Config GetInputRouterConfigForPlatform() { | 100 InputRouterImpl::Config GetInputRouterConfigForPlatform() { |
107 InputRouterImpl::Config config; | 101 InputRouterImpl::Config config; |
108 config.gesture_config = GetGestureEventQueueConfig(); | 102 config.gesture_config = GetGestureEventQueueConfig(); |
109 config.touch_config = GetTouchEventQueueConfig(); | 103 config.touch_config = GetTouchEventQueueConfig(); |
110 return config; | 104 return config; |
111 } | 105 } |
112 | 106 |
113 } // namespace content | 107 } // namespace content |
OLD | NEW |