OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/shell_content_browser_client.h" | 5 #include "content/shell/browser/shell_content_browser_client.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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 if (CommandLine::ForCurrentProcess()->HasSwitch( | 230 if (CommandLine::ForCurrentProcess()->HasSwitch( |
231 switches::kEnableLeakDetection)) | 231 switches::kEnableLeakDetection)) |
232 command_line->AppendSwitch(switches::kEnableLeakDetection); | 232 command_line->AppendSwitch(switches::kEnableLeakDetection); |
233 if (CommandLine::ForCurrentProcess()->HasSwitch( | 233 if (CommandLine::ForCurrentProcess()->HasSwitch( |
234 switches::kRegisterFontFiles)) { | 234 switches::kRegisterFontFiles)) { |
235 command_line->AppendSwitchASCII( | 235 command_line->AppendSwitchASCII( |
236 switches::kRegisterFontFiles, | 236 switches::kRegisterFontFiles, |
237 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 237 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
238 switches::kRegisterFontFiles)); | 238 switches::kRegisterFontFiles)); |
239 } | 239 } |
| 240 |
| 241 // Speech Synthesis backend lives in chrome/. See crbug.com/347045 |
| 242 // tracking moving it to content/. |
| 243 command_line->AppendSwitch(switches::kDisableSpeechSynthesis); |
240 } | 244 } |
241 | 245 |
242 void ShellContentBrowserClient::OverrideWebkitPrefs( | 246 void ShellContentBrowserClient::OverrideWebkitPrefs( |
243 RenderViewHost* render_view_host, | 247 RenderViewHost* render_view_host, |
244 const GURL& url, | 248 const GURL& url, |
245 WebPreferences* prefs) { | 249 WebPreferences* prefs) { |
246 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 250 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
247 return; | 251 return; |
248 WebKitTestController::Get()->OverrideWebkitPrefs(prefs); | 252 WebKitTestController::Get()->OverrideWebkitPrefs(prefs); |
249 } | 253 } |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 ShellBrowserContext* | 368 ShellBrowserContext* |
365 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 369 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
366 BrowserContext* content_browser_context) { | 370 BrowserContext* content_browser_context) { |
367 if (content_browser_context == browser_context()) | 371 if (content_browser_context == browser_context()) |
368 return browser_context(); | 372 return browser_context(); |
369 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 373 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
370 return off_the_record_browser_context(); | 374 return off_the_record_browser_context(); |
371 } | 375 } |
372 | 376 |
373 } // namespace content | 377 } // namespace content |
OLD | NEW |