| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 } | 142 } |
| 143 | 143 |
| 144 if (command_line.HasSwitch(switches::kDumpRenderTree)) { | 144 if (command_line.HasSwitch(switches::kDumpRenderTree)) { |
| 145 EnableBrowserLayoutTestMode(); | 145 EnableBrowserLayoutTestMode(); |
| 146 | 146 |
| 147 command_line.AppendSwitch(switches::kProcessPerTab); | 147 command_line.AppendSwitch(switches::kProcessPerTab); |
| 148 command_line.AppendSwitch(switches::kEnableLogging); | 148 command_line.AppendSwitch(switches::kEnableLogging); |
| 149 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); | 149 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); |
| 150 command_line.AppendSwitchASCII(switches::kUseGL, | 150 command_line.AppendSwitchASCII(switches::kUseGL, |
| 151 gfx::kGLImplementationOSMesaName); | 151 gfx::kGLImplementationOSMesaName); |
| 152 command_line.AppendSwitch(switches::kSkipGpuDataLoading); |
| 152 command_line.AppendSwitchASCII(switches::kTouchEvents, | 153 command_line.AppendSwitchASCII(switches::kTouchEvents, |
| 153 switches::kTouchEventsEnabled); | 154 switches::kTouchEventsEnabled); |
| 154 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); | 155 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); |
| 155 #if defined(OS_ANDROID) | 156 #if defined(OS_ANDROID) |
| 156 command_line.AppendSwitch( | 157 command_line.AppendSwitch( |
| 157 switches::kDisableGestureRequirementForMediaPlayback); | 158 switches::kDisableGestureRequirementForMediaPlayback); |
| 158 #endif | 159 #endif |
| 159 | 160 |
| 160 if (!command_line.HasSwitch(switches::kStableReleaseMode)) { | 161 if (!command_line.HasSwitch(switches::kStableReleaseMode)) { |
| 161 command_line.AppendSwitch( | 162 command_line.AppendSwitch( |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 322 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
| 322 renderer_client_.reset(base::CommandLine::ForCurrentProcess()->HasSwitch( | 323 renderer_client_.reset(base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 323 switches::kDumpRenderTree) | 324 switches::kDumpRenderTree) |
| 324 ? new LayoutTestContentRendererClient | 325 ? new LayoutTestContentRendererClient |
| 325 : new ShellContentRendererClient); | 326 : new ShellContentRendererClient); |
| 326 | 327 |
| 327 return renderer_client_.get(); | 328 return renderer_client_.get(); |
| 328 } | 329 } |
| 329 | 330 |
| 330 } // namespace content | 331 } // namespace content |
| OLD | NEW |