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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 #if defined(OS_WIN) | 62 #if defined(OS_WIN) |
63 #include "content/common/sandbox_win.h" | 63 #include "content/common/sandbox_win.h" |
64 #include "sandbox/win/src/sandbox.h" | 64 #include "sandbox/win/src/sandbox.h" |
65 #endif | 65 #endif |
66 | 66 |
67 #if BUILDFLAG(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 67 #if BUILDFLAG(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
68 #include "media/mojo/services/media_service_factory.h" // nogncheck | 68 #include "media/mojo/services/media_service_factory.h" // nogncheck |
69 #endif | 69 #endif |
70 | 70 |
71 #if defined(USE_AURA) | |
72 #include "services/navigation/navigation.h" | |
73 #endif | |
74 | |
75 namespace content { | 71 namespace content { |
76 | 72 |
77 namespace { | 73 namespace { |
78 | 74 |
79 ShellContentBrowserClient* g_browser_client; | 75 ShellContentBrowserClient* g_browser_client; |
80 bool g_swap_processes_for_redirect = false; | 76 bool g_swap_processes_for_redirect = false; |
81 | 77 |
82 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 78 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
83 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( | 79 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( |
84 const std::string& process_type) { | 80 const std::string& process_type) { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 194 |
199 void ShellContentBrowserClient::RegisterInProcessServices( | 195 void ShellContentBrowserClient::RegisterInProcessServices( |
200 StaticServiceMap* services) { | 196 StaticServiceMap* services) { |
201 #if BUILDFLAG(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 197 #if BUILDFLAG(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
202 { | 198 { |
203 content::ServiceInfo info; | 199 content::ServiceInfo info; |
204 info.factory = base::Bind(&media::CreateMediaServiceForTesting); | 200 info.factory = base::Bind(&media::CreateMediaServiceForTesting); |
205 services->insert(std::make_pair("media", info)); | 201 services->insert(std::make_pair("media", info)); |
206 } | 202 } |
207 #endif | 203 #endif |
208 #if defined(USE_AURA) | |
209 { | |
210 content::ServiceInfo info; | |
211 info.factory = base::Bind(&navigation::CreateNavigationService); | |
212 services->insert(std::make_pair("navigation", info)); | |
213 } | |
214 #endif | |
215 } | 204 } |
216 | 205 |
217 void ShellContentBrowserClient::RegisterOutOfProcessServices( | 206 void ShellContentBrowserClient::RegisterOutOfProcessServices( |
218 OutOfProcessServiceMap* services) { | 207 OutOfProcessServiceMap* services) { |
219 services->insert(std::make_pair(kTestServiceUrl, | 208 services->insert(std::make_pair(kTestServiceUrl, |
220 base::UTF8ToUTF16("Test Service"))); | 209 base::UTF8ToUTF16("Test Service"))); |
221 } | 210 } |
222 | 211 |
223 std::unique_ptr<base::Value> | 212 std::unique_ptr<base::Value> |
224 ShellContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) { | 213 ShellContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 ShellBrowserContext* ShellContentBrowserClient::browser_context() { | 371 ShellBrowserContext* ShellContentBrowserClient::browser_context() { |
383 return shell_browser_main_parts_->browser_context(); | 372 return shell_browser_main_parts_->browser_context(); |
384 } | 373 } |
385 | 374 |
386 ShellBrowserContext* | 375 ShellBrowserContext* |
387 ShellContentBrowserClient::off_the_record_browser_context() { | 376 ShellContentBrowserClient::off_the_record_browser_context() { |
388 return shell_browser_main_parts_->off_the_record_browser_context(); | 377 return shell_browser_main_parts_->off_the_record_browser_context(); |
389 } | 378 } |
390 | 379 |
391 } // namespace content | 380 } // namespace content |
OLD | NEW |