Chromium Code Reviews| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 #include "components/crash/content/app/breakpad_linux.h" | 55 #include "components/crash/content/app/breakpad_linux.h" |
| 56 #include "components/crash/content/browser/crash_handler_host_linux.h" | 56 #include "components/crash/content/browser/crash_handler_host_linux.h" |
| 57 #include "content/public/common/content_descriptors.h" | 57 #include "content/public/common/content_descriptors.h" |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 #if defined(OS_WIN) | 60 #if defined(OS_WIN) |
| 61 #include "content/common/sandbox_win.h" | 61 #include "content/common/sandbox_win.h" |
| 62 #include "sandbox/win/src/sandbox.h" | 62 #include "sandbox/win/src/sandbox.h" |
| 63 #endif | 63 #endif |
| 64 | 64 |
| 65 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | |
| 66 #include "media/mojo/services/mojo_media_application.h" | |
| 67 #endif | |
|
xhwang
2016/02/02 20:25:16
What is this for?
alokp
2016/02/02 20:37:00
Please see my comment below.
| |
| 68 | |
| 65 namespace content { | 69 namespace content { |
| 66 | 70 |
| 67 namespace { | 71 namespace { |
| 68 | 72 |
| 69 ShellContentBrowserClient* g_browser_client; | 73 ShellContentBrowserClient* g_browser_client; |
| 70 bool g_swap_processes_for_redirect = false; | 74 bool g_swap_processes_for_redirect = false; |
| 71 | 75 |
| 72 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 76 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 73 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( | 77 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( |
| 74 const std::string& process_type) { | 78 const std::string& process_type) { |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 #if defined(OS_WIN) || defined(OS_MACOSX) | 218 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 215 return true; | 219 return true; |
| 216 #else | 220 #else |
| 217 return false; | 221 return false; |
| 218 #endif | 222 #endif |
| 219 } | 223 } |
| 220 | 224 |
| 221 void ShellContentBrowserClient::RegisterInProcessMojoApplications( | 225 void ShellContentBrowserClient::RegisterInProcessMojoApplications( |
| 222 StaticMojoApplicationMap* apps) { | 226 StaticMojoApplicationMap* apps) { |
| 223 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 227 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 224 apps->insert(std::make_pair( | 228 apps->insert(std::make_pair( |
|
alokp
2016/02/02 20:37:00
we need to include media/mojo/services/mojo_media_
xhwang
2016/02/02 20:46:49
Oh, I forgot about this.
| |
| 225 GURL("mojo:media"), base::Bind(&media::MojoMediaApplication::CreateApp))); | 229 GURL("mojo:media"), base::Bind(&media::MojoMediaApplication::CreateApp))); |
| 226 #endif | 230 #endif |
| 227 } | 231 } |
| 228 | 232 |
| 229 void ShellContentBrowserClient::RegisterOutOfProcessMojoApplications( | 233 void ShellContentBrowserClient::RegisterOutOfProcessMojoApplications( |
| 230 OutOfProcessMojoApplicationMap* apps) { | 234 OutOfProcessMojoApplicationMap* apps) { |
| 231 apps->insert(std::make_pair(GURL(kTestMojoAppUrl), | 235 apps->insert(std::make_pair(GURL(kTestMojoAppUrl), |
| 232 base::UTF8ToUTF16("Test Mojo App"))); | 236 base::UTF8ToUTF16("Test Mojo App"))); |
| 233 } | 237 } |
| 234 | 238 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 439 ShellBrowserContext* | 443 ShellBrowserContext* |
| 440 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 444 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
| 441 BrowserContext* content_browser_context) { | 445 BrowserContext* content_browser_context) { |
| 442 if (content_browser_context == browser_context()) | 446 if (content_browser_context == browser_context()) |
| 443 return browser_context(); | 447 return browser_context(); |
| 444 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 448 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
| 445 return off_the_record_browser_context(); | 449 return off_the_record_browser_context(); |
| 446 } | 450 } |
| 447 | 451 |
| 448 } // namespace content | 452 } // namespace content |
| OLD | NEW |