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 "cc/base/switches.h" |
8 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
9 #include "ui/events/gesture_detection/gesture_configuration.h" | 10 #include "ui/events/gesture_detection/gesture_configuration.h" |
10 #include "ui/events/gesture_detection/gesture_detector.h" | 11 #include "ui/events/gesture_detection/gesture_detector.h" |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 namespace { | 14 namespace { |
14 | 15 |
15 // Default time allowance for the touch ack delay before the touch sequence is | 16 // Default time allowance for the touch ack delay before the touch sequence is |
16 // cancelled, depending on whether the site has a mobile-friendly viewport. | 17 // cancelled, depending on whether the site has a mobile-friendly viewport. |
17 // Note that these constants are effective only when the timeout is supported. | 18 // Note that these constants are effective only when the timeout is supported. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 64 |
64 return config; | 65 return config; |
65 } | 66 } |
66 | 67 |
67 } // namespace | 68 } // namespace |
68 | 69 |
69 InputRouterImpl::Config GetInputRouterConfigForPlatform() { | 70 InputRouterImpl::Config GetInputRouterConfigForPlatform() { |
70 InputRouterImpl::Config config; | 71 InputRouterImpl::Config config; |
71 config.gesture_config = GetGestureEventQueueConfig(); | 72 config.gesture_config = GetGestureEventQueueConfig(); |
72 config.touch_config = GetTouchEventQueueConfig(); | 73 config.touch_config = GetTouchEventQueueConfig(); |
| 74 #if !defined(OS_ANDROID) |
| 75 config.buffer_wheel_events_until_flush = |
| 76 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 77 cc::switches::kEnableBeginFrameScheduling); |
| 78 #else |
| 79 config.buffer_wheel_events_until_flush = false; |
| 80 #endif |
73 return config; | 81 return config; |
74 } | 82 } |
75 | 83 |
76 } // namespace content | 84 } // namespace content |
OLD | NEW |