| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 if (!ppapi::RegisterBlinkTestPlugin(&command_line)) { | 160 if (!ppapi::RegisterBlinkTestPlugin(&command_line)) { |
| 161 *exit_code = 1; | 161 *exit_code = 1; |
| 162 return true; | 162 return true; |
| 163 } | 163 } |
| 164 #endif | 164 #endif |
| 165 command_line.AppendSwitch(cc::switches::kEnableGpuBenchmarking); | 165 command_line.AppendSwitch(cc::switches::kEnableGpuBenchmarking); |
| 166 command_line.AppendSwitch(switches::kProcessPerTab); | 166 command_line.AppendSwitch(switches::kProcessPerTab); |
| 167 command_line.AppendSwitch(switches::kEnableLogging); | 167 command_line.AppendSwitch(switches::kEnableLogging); |
| 168 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); | 168 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); |
| 169 // only default to osmesa if the flag isn't already specified. | 169 // only default to osmesa if the flag isn't already specified. |
| 170 if (!command_line.HasSwitch(switches::kUseGL)) { | 170 if (!command_line.HasSwitch(switches::kUseGpuInTests) && |
| 171 !command_line.HasSwitch(switches::kUseGL)) { |
| 171 command_line.AppendSwitchASCII(switches::kUseGL, | 172 command_line.AppendSwitchASCII(switches::kUseGL, |
| 172 gl::kGLImplementationOSMesaName); | 173 gl::kGLImplementationOSMesaName); |
| 173 } | 174 } |
| 174 command_line.AppendSwitch(switches::kSkipGpuDataLoading); | 175 command_line.AppendSwitch(switches::kSkipGpuDataLoading); |
| 175 command_line.AppendSwitchASCII(switches::kTouchEvents, | 176 command_line.AppendSwitchASCII(switches::kTouchEvents, |
| 176 switches::kTouchEventsEnabled); | 177 switches::kTouchEventsEnabled); |
| 177 if (!command_line.HasSwitch(switches::kForceDeviceScaleFactor)) | 178 if (!command_line.HasSwitch(switches::kForceDeviceScaleFactor)) |
| 178 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); | 179 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); |
| 179 command_line.AppendSwitch( | 180 command_line.AppendSwitch( |
| 180 switches::kDisableGestureRequirementForMediaPlayback); | 181 switches::kDisableGestureRequirementForMediaPlayback); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 | 368 |
| 368 return renderer_client_.get(); | 369 return renderer_client_.get(); |
| 369 } | 370 } |
| 370 | 371 |
| 371 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { | 372 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { |
| 372 utility_client_.reset(new ShellContentUtilityClient); | 373 utility_client_.reset(new ShellContentUtilityClient); |
| 373 return utility_client_.get(); | 374 return utility_client_.get(); |
| 374 } | 375 } |
| 375 | 376 |
| 376 } // namespace content | 377 } // namespace content |
| OLD | NEW |