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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 } | 149 } |
150 | 150 |
151 if (command_line.HasSwitch(switches::kRunLayoutTest)) { | 151 if (command_line.HasSwitch(switches::kRunLayoutTest)) { |
152 EnableBrowserLayoutTestMode(); | 152 EnableBrowserLayoutTestMode(); |
153 | 153 |
154 command_line.AppendSwitch(switches::kProcessPerTab); | 154 command_line.AppendSwitch(switches::kProcessPerTab); |
155 command_line.AppendSwitch(switches::kEnableLogging); | 155 command_line.AppendSwitch(switches::kEnableLogging); |
156 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); | 156 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); |
157 command_line.AppendSwitchASCII(switches::kUseGL, | 157 command_line.AppendSwitchASCII(switches::kUseGL, |
158 gfx::kGLImplementationOSMesaName); | 158 gfx::kGLImplementationOSMesaName); |
159 command_line.AppendSwitch(switches::kSkipGpuDataLoading); | |
160 command_line.AppendSwitchASCII(switches::kTouchEvents, | 159 command_line.AppendSwitchASCII(switches::kTouchEvents, |
161 switches::kTouchEventsEnabled); | 160 switches::kTouchEventsEnabled); |
162 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); | 161 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); |
163 #if defined(OS_ANDROID) | 162 #if defined(OS_ANDROID) |
164 command_line.AppendSwitch( | 163 command_line.AppendSwitch( |
165 switches::kDisableGestureRequirementForMediaPlayback); | 164 switches::kDisableGestureRequirementForMediaPlayback); |
166 #endif | 165 #endif |
167 | 166 |
168 if (!command_line.HasSwitch(switches::kStableReleaseMode)) { | 167 if (!command_line.HasSwitch(switches::kStableReleaseMode)) { |
169 command_line.AppendSwitch( | 168 command_line.AppendSwitch( |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 334 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
336 renderer_client_.reset(base::CommandLine::ForCurrentProcess()->HasSwitch( | 335 renderer_client_.reset(base::CommandLine::ForCurrentProcess()->HasSwitch( |
337 switches::kRunLayoutTest) | 336 switches::kRunLayoutTest) |
338 ? new LayoutTestContentRendererClient | 337 ? new LayoutTestContentRendererClient |
339 : new ShellContentRendererClient); | 338 : new ShellContentRendererClient); |
340 | 339 |
341 return renderer_client_.get(); | 340 return renderer_client_.get(); |
342 } | 341 } |
343 | 342 |
344 } // namespace content | 343 } // namespace content |
OLD | NEW |