OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/android/content_startup_flags.h" | 5 #include "content/browser/android/content_startup_flags.h" |
6 | 6 |
7 #include "base/android/build_info.h" | 7 #include "base/android/build_info.h" |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 if (single_process) { | 33 if (single_process) { |
34 // Need to ensure the command line flag is consistent as a lot of chrome | 34 // Need to ensure the command line flag is consistent as a lot of chrome |
35 // internal code checks this directly, but it wouldn't normally get set when | 35 // internal code checks this directly, but it wouldn't normally get set when |
36 // we are implementing an embedded WebView. | 36 // we are implementing an embedded WebView. |
37 parsed_command_line->AppendSwitch(switches::kSingleProcess); | 37 parsed_command_line->AppendSwitch(switches::kSingleProcess); |
38 } | 38 } |
39 | 39 |
40 parsed_command_line->AppendSwitch(cc::switches::kEnableBeginFrameScheduling); | 40 parsed_command_line->AppendSwitch(cc::switches::kEnableBeginFrameScheduling); |
41 | 41 |
42 parsed_command_line->AppendSwitch(switches::kEnablePinch); | 42 parsed_command_line->AppendSwitch(switches::kEnablePinch); |
| 43 parsed_command_line->AppendSwitch(switches::kEnableViewport); |
43 parsed_command_line->AppendSwitch(switches::kEnableOverlayScrollbar); | 44 parsed_command_line->AppendSwitch(switches::kEnableOverlayScrollbar); |
44 parsed_command_line->AppendSwitch(switches::kValidateInputEventStream); | 45 parsed_command_line->AppendSwitch(switches::kValidateInputEventStream); |
45 | 46 |
46 if (base::android::BuildInfo::GetInstance()->sdk_int() >= | 47 if (base::android::BuildInfo::GetInstance()->sdk_int() >= |
47 base::android::SDK_VERSION_MARSHMALLOW) { | 48 base::android::SDK_VERSION_MARSHMALLOW) { |
48 parsed_command_line->AppendSwitch(switches::kEnableLongpressDragSelection); | 49 parsed_command_line->AppendSwitch(switches::kEnableLongpressDragSelection); |
49 parsed_command_line->AppendSwitchASCII( | 50 parsed_command_line->AppendSwitchASCII( |
50 switches::kTouchTextSelectionStrategy, "direction"); | 51 switches::kTouchTextSelectionStrategy, "direction"); |
51 } | 52 } |
52 | 53 |
(...skipping 28 matching lines...) Expand all Loading... |
81 } | 82 } |
82 | 83 |
83 cc::LayerSettings layer_settings; | 84 cc::LayerSettings layer_settings; |
84 layer_settings.use_compositor_animation_timelines = | 85 layer_settings.use_compositor_animation_timelines = |
85 !parsed_command_line->HasSwitch( | 86 !parsed_command_line->HasSwitch( |
86 switches::kDisableAndroidCompositorAnimationTimelines); | 87 switches::kDisableAndroidCompositorAnimationTimelines); |
87 Compositor::SetLayerSettings(layer_settings); | 88 Compositor::SetLayerSettings(layer_settings); |
88 } | 89 } |
89 | 90 |
90 } // namespace content | 91 } // namespace content |
OLD | NEW |