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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 command_line.AppendSwitch(cc::switches::kCompositeToMailbox); | 176 command_line.AppendSwitch(cc::switches::kCompositeToMailbox); |
177 #endif | 177 #endif |
178 | 178 |
179 command_line.AppendSwitch(switches::kEnableFileCookies); | 179 command_line.AppendSwitch(switches::kEnableFileCookies); |
180 | 180 |
181 command_line.AppendSwitch(switches::kEnablePreciseMemoryInfo); | 181 command_line.AppendSwitch(switches::kEnablePreciseMemoryInfo); |
182 | 182 |
183 command_line.AppendSwitchASCII(switches::kHostResolverRules, | 183 command_line.AppendSwitchASCII(switches::kHostResolverRules, |
184 "MAP *.test 127.0.0.1"); | 184 "MAP *.test 127.0.0.1"); |
185 | 185 |
| 186 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 187 // TODO(wfh): crbug.com/295137 Remove this when NPAPI is gone. |
| 188 command_line.AppendSwitch(switches::kEnableNpapi); |
| 189 #endif |
| 190 |
186 // Unless/until WebM files are added to the media layout tests, we need to | 191 // Unless/until WebM files are added to the media layout tests, we need to |
187 // avoid removing MP4/H264/AAC so that layout tests can run on Android. | 192 // avoid removing MP4/H264/AAC so that layout tests can run on Android. |
188 #if !defined(OS_ANDROID) | 193 #if !defined(OS_ANDROID) |
189 net::RemoveProprietaryMediaTypesAndCodecsForTests(); | 194 net::RemoveProprietaryMediaTypesAndCodecsForTests(); |
190 #endif | 195 #endif |
191 | 196 |
192 if (!WebKitTestPlatformInitialize()) { | 197 if (!WebKitTestPlatformInitialize()) { |
193 if (exit_code) | 198 if (exit_code) |
194 *exit_code = 1; | 199 *exit_code = 1; |
195 return true; | 200 return true; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 | 314 |
310 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 315 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
311 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 316 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
312 renderer_client_.reset(new LayoutTestContentRendererClient); | 317 renderer_client_.reset(new LayoutTestContentRendererClient); |
313 else | 318 else |
314 renderer_client_.reset(new ShellContentRendererClient); | 319 renderer_client_.reset(new ShellContentRendererClient); |
315 return renderer_client_.get(); | 320 return renderer_client_.get(); |
316 } | 321 } |
317 | 322 |
318 } // namespace content | 323 } // namespace content |
OLD | NEW |