| 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/shell/app/shell_main_delegate.h" | 5 #include "content/shell/app/shell_main_delegate.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 if (command_line.HasSwitch(switches::kRunLayoutTest)) { | 159 if (command_line.HasSwitch(switches::kRunLayoutTest)) { |
| 160 EnableBrowserLayoutTestMode(); | 160 EnableBrowserLayoutTestMode(); |
| 161 | 161 |
| 162 #if BUILDFLAG(ENABLE_PLUGINS) | 162 #if BUILDFLAG(ENABLE_PLUGINS) |
| 163 if (!ppapi::RegisterBlinkTestPlugin(&command_line)) { | 163 if (!ppapi::RegisterBlinkTestPlugin(&command_line)) { |
| 164 *exit_code = 1; | 164 *exit_code = 1; |
| 165 return true; | 165 return true; |
| 166 } | 166 } |
| 167 #endif | 167 #endif |
| 168 command_line.AppendSwitch(cc::switches::kEnableGpuBenchmarking); | 168 command_line.AppendSwitch(cc::switches::kEnableGpuBenchmarking); |
| 169 command_line.AppendSwitch(switches::kProcessPerTab); | |
| 170 command_line.AppendSwitch(switches::kEnableLogging); | 169 command_line.AppendSwitch(switches::kEnableLogging); |
| 171 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); | 170 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); |
| 172 // only default to a software GL if the flag isn't already specified. | 171 // only default to a software GL if the flag isn't already specified. |
| 173 if (!command_line.HasSwitch(switches::kUseGpuInTests) && | 172 if (!command_line.HasSwitch(switches::kUseGpuInTests) && |
| 174 !command_line.HasSwitch(switches::kUseGL)) { | 173 !command_line.HasSwitch(switches::kUseGL)) { |
| 175 command_line.AppendSwitchASCII( | 174 command_line.AppendSwitchASCII( |
| 176 switches::kUseGL, | 175 switches::kUseGL, |
| 177 gl::GetGLImplementationName(gl::GetSoftwareGLImplementation())); | 176 gl::GetGLImplementationName(gl::GetSoftwareGLImplementation())); |
| 178 } | 177 } |
| 179 command_line.AppendSwitch(switches::kSkipGpuDataLoading); | 178 command_line.AppendSwitch(switches::kSkipGpuDataLoading); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 385 |
| 387 return renderer_client_.get(); | 386 return renderer_client_.get(); |
| 388 } | 387 } |
| 389 | 388 |
| 390 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { | 389 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { |
| 391 utility_client_.reset(new ShellContentUtilityClient); | 390 utility_client_.reset(new ShellContentUtilityClient); |
| 392 return utility_client_.get(); | 391 return utility_client_.get(); |
| 393 } | 392 } |
| 394 | 393 |
| 395 } // namespace content | 394 } // namespace content |
| OLD | NEW |