| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 } | 211 } |
| 212 | 212 |
| 213 bool ShellContentBrowserClient::IsNPAPIEnabled() { | 213 bool ShellContentBrowserClient::IsNPAPIEnabled() { |
| 214 #if defined(OS_WIN) || defined(OS_MACOSX) | 214 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 215 return true; | 215 return true; |
| 216 #else | 216 #else |
| 217 return false; | 217 return false; |
| 218 #endif | 218 #endif |
| 219 } | 219 } |
| 220 | 220 |
| 221 void ShellContentBrowserClient::RegisterInProcessMojoApplications( |
| 222 StaticMojoApplicationMap* apps) { |
| 223 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 224 apps->insert(std::make_pair( |
| 225 GURL("mojo:media"), base::Bind(&media::MojoMediaApplication::CreateApp))); |
| 226 #endif |
| 227 } |
| 228 |
| 221 void ShellContentBrowserClient::RegisterOutOfProcessMojoApplications( | 229 void ShellContentBrowserClient::RegisterOutOfProcessMojoApplications( |
| 222 OutOfProcessMojoApplicationMap* apps) { | 230 OutOfProcessMojoApplicationMap* apps) { |
| 223 apps->insert(std::make_pair(GURL(kTestMojoAppUrl), | 231 apps->insert(std::make_pair(GURL(kTestMojoAppUrl), |
| 224 base::UTF8ToUTF16("Test Mojo App"))); | 232 base::UTF8ToUTF16("Test Mojo App"))); |
| 225 } | 233 } |
| 226 | 234 |
| 227 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( | 235 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( |
| 228 base::CommandLine* command_line, | 236 base::CommandLine* command_line, |
| 229 int child_process_id) { | 237 int child_process_id) { |
| 230 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 238 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 ShellBrowserContext* | 439 ShellBrowserContext* |
| 432 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 440 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
| 433 BrowserContext* content_browser_context) { | 441 BrowserContext* content_browser_context) { |
| 434 if (content_browser_context == browser_context()) | 442 if (content_browser_context == browser_context()) |
| 435 return browser_context(); | 443 return browser_context(); |
| 436 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 444 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
| 437 return off_the_record_browser_context(); | 445 return off_the_record_browser_context(); |
| 438 } | 446 } |
| 439 | 447 |
| 440 } // namespace content | 448 } // namespace content |
| OLD | NEW |