| 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 18 matching lines...) Expand all Loading... |
| 29 base::CommandLine* parsed_command_line = | 29 base::CommandLine* parsed_command_line = |
| 30 base::CommandLine::ForCurrentProcess(); | 30 base::CommandLine::ForCurrentProcess(); |
| 31 | 31 |
| 32 if (single_process) { | 32 if (single_process) { |
| 33 // Need to ensure the command line flag is consistent as a lot of chrome | 33 // Need to ensure the command line flag is consistent as a lot of chrome |
| 34 // internal code checks this directly, but it wouldn't normally get set when | 34 // internal code checks this directly, but it wouldn't normally get set when |
| 35 // we are implementing an embedded WebView. | 35 // we are implementing an embedded WebView. |
| 36 parsed_command_line->AppendSwitch(switches::kSingleProcess); | 36 parsed_command_line->AppendSwitch(switches::kSingleProcess); |
| 37 } | 37 } |
| 38 | 38 |
| 39 parsed_command_line->AppendSwitch(cc::switches::kEnableBeginFrameScheduling); |
| 40 |
| 39 parsed_command_line->AppendSwitch(switches::kEnablePinch); | 41 parsed_command_line->AppendSwitch(switches::kEnablePinch); |
| 40 parsed_command_line->AppendSwitch(switches::kEnableViewport); | 42 parsed_command_line->AppendSwitch(switches::kEnableViewport); |
| 41 parsed_command_line->AppendSwitch(switches::kEnableOverlayScrollbar); | 43 parsed_command_line->AppendSwitch(switches::kEnableOverlayScrollbar); |
| 42 parsed_command_line->AppendSwitch(switches::kValidateInputEventStream); | 44 parsed_command_line->AppendSwitch(switches::kValidateInputEventStream); |
| 43 | 45 |
| 44 if (base::android::BuildInfo::GetInstance()->sdk_int() >= | 46 if (base::android::BuildInfo::GetInstance()->sdk_int() >= |
| 45 base::android::SDK_VERSION_MARSHMALLOW) { | 47 base::android::SDK_VERSION_MARSHMALLOW) { |
| 46 parsed_command_line->AppendSwitch(switches::kEnableLongpressDragSelection); | 48 parsed_command_line->AppendSwitch(switches::kEnableLongpressDragSelection); |
| 47 parsed_command_line->AppendSwitchASCII( | 49 parsed_command_line->AppendSwitchASCII( |
| 48 switches::kTouchTextSelectionStrategy, "direction"); | 50 switches::kTouchTextSelectionStrategy, "direction"); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 73 } | 75 } |
| 74 | 76 |
| 75 // Disable profiler timing by default. | 77 // Disable profiler timing by default. |
| 76 if (!parsed_command_line->HasSwitch(switches::kProfilerTiming)) { | 78 if (!parsed_command_line->HasSwitch(switches::kProfilerTiming)) { |
| 77 parsed_command_line->AppendSwitchASCII( | 79 parsed_command_line->AppendSwitchASCII( |
| 78 switches::kProfilerTiming, switches::kProfilerTimingDisabledValue); | 80 switches::kProfilerTiming, switches::kProfilerTimingDisabledValue); |
| 79 } | 81 } |
| 80 } | 82 } |
| 81 | 83 |
| 82 } // namespace content | 84 } // namespace content |
| OLD | NEW |