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 20 matching lines...) Expand all Loading... |
31 #include "content/shell/browser/shell_browser_context.h" | 31 #include "content/shell/browser/shell_browser_context.h" |
32 #include "content/shell/browser/shell_browser_main_parts.h" | 32 #include "content/shell/browser/shell_browser_main_parts.h" |
33 #include "content/shell/browser/shell_devtools_manager_delegate.h" | 33 #include "content/shell/browser/shell_devtools_manager_delegate.h" |
34 #include "content/shell/browser/shell_net_log.h" | 34 #include "content/shell/browser/shell_net_log.h" |
35 #include "content/shell/browser/shell_quota_permission_context.h" | 35 #include "content/shell/browser/shell_quota_permission_context.h" |
36 #include "content/shell/browser/shell_resource_dispatcher_host_delegate.h" | 36 #include "content/shell/browser/shell_resource_dispatcher_host_delegate.h" |
37 #include "content/shell/browser/shell_web_contents_view_delegate_creator.h" | 37 #include "content/shell/browser/shell_web_contents_view_delegate_creator.h" |
38 #include "content/shell/common/shell_messages.h" | 38 #include "content/shell/common/shell_messages.h" |
39 #include "content/shell/common/shell_switches.h" | 39 #include "content/shell/common/shell_switches.h" |
40 #include "content/shell/grit/shell_resources.h" | 40 #include "content/shell/grit/shell_resources.h" |
| 41 #include "media/mojo/features.h" |
41 #include "net/url_request/url_request_context_getter.h" | 42 #include "net/url_request/url_request_context_getter.h" |
42 #include "storage/browser/quota/quota_settings.h" | 43 #include "storage/browser/quota/quota_settings.h" |
43 #include "ui/base/resource/resource_bundle.h" | 44 #include "ui/base/resource/resource_bundle.h" |
44 #include "url/gurl.h" | 45 #include "url/gurl.h" |
45 #include "url/origin.h" | 46 #include "url/origin.h" |
46 | 47 |
47 #if defined(OS_ANDROID) | 48 #if defined(OS_ANDROID) |
48 #include "base/android/apk_assets.h" | 49 #include "base/android/apk_assets.h" |
49 #include "base/android/path_utils.h" | 50 #include "base/android/path_utils.h" |
50 #include "components/crash/content/browser/crash_dump_manager_android.h" | 51 #include "components/crash/content/browser/crash_dump_manager_android.h" |
51 #include "content/shell/android/shell_descriptors.h" | 52 #include "content/shell/android/shell_descriptors.h" |
52 #endif | 53 #endif |
53 | 54 |
54 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 55 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
55 #include "base/debug/leak_annotations.h" | 56 #include "base/debug/leak_annotations.h" |
56 #include "components/crash/content/app/breakpad_linux.h" | 57 #include "components/crash/content/app/breakpad_linux.h" |
57 #include "components/crash/content/browser/crash_handler_host_linux.h" | 58 #include "components/crash/content/browser/crash_handler_host_linux.h" |
58 #include "content/public/common/content_descriptors.h" | 59 #include "content/public/common/content_descriptors.h" |
59 #endif | 60 #endif |
60 | 61 |
61 #if defined(OS_WIN) | 62 #if defined(OS_WIN) |
62 #include "content/common/sandbox_win.h" | 63 #include "content/common/sandbox_win.h" |
63 #include "sandbox/win/src/sandbox.h" | 64 #include "sandbox/win/src/sandbox.h" |
64 #endif | 65 #endif |
65 | 66 |
66 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 67 #if BUILDFLAG(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
67 #include "media/mojo/services/media_service_factory.h" // nogncheck | 68 #include "media/mojo/services/media_service_factory.h" // nogncheck |
68 #endif | 69 #endif |
69 | 70 |
70 #if defined(USE_AURA) | 71 #if defined(USE_AURA) |
71 #include "services/navigation/navigation.h" | 72 #include "services/navigation/navigation.h" |
72 #endif | 73 #endif |
73 | 74 |
74 namespace content { | 75 namespace content { |
75 | 76 |
76 namespace { | 77 namespace { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 }; | 191 }; |
191 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { | 192 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { |
192 if (url.scheme() == kProtocolList[i]) | 193 if (url.scheme() == kProtocolList[i]) |
193 return true; | 194 return true; |
194 } | 195 } |
195 return false; | 196 return false; |
196 } | 197 } |
197 | 198 |
198 void ShellContentBrowserClient::RegisterInProcessServices( | 199 void ShellContentBrowserClient::RegisterInProcessServices( |
199 StaticServiceMap* services) { | 200 StaticServiceMap* services) { |
200 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 201 #if BUILDFLAG(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
201 { | 202 { |
202 content::ServiceInfo info; | 203 content::ServiceInfo info; |
203 info.factory = base::Bind(&media::CreateMediaServiceForTesting); | 204 info.factory = base::Bind(&media::CreateMediaServiceForTesting); |
204 services->insert(std::make_pair("media", info)); | 205 services->insert(std::make_pair("media", info)); |
205 } | 206 } |
206 #endif | 207 #endif |
207 #if defined(USE_AURA) | 208 #if defined(USE_AURA) |
208 { | 209 { |
209 content::ServiceInfo info; | 210 content::ServiceInfo info; |
210 info.factory = base::Bind(&navigation::CreateNavigationService); | 211 info.factory = base::Bind(&navigation::CreateNavigationService); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 ShellBrowserContext* ShellContentBrowserClient::browser_context() { | 382 ShellBrowserContext* ShellContentBrowserClient::browser_context() { |
382 return shell_browser_main_parts_->browser_context(); | 383 return shell_browser_main_parts_->browser_context(); |
383 } | 384 } |
384 | 385 |
385 ShellBrowserContext* | 386 ShellBrowserContext* |
386 ShellContentBrowserClient::off_the_record_browser_context() { | 387 ShellContentBrowserClient::off_the_record_browser_context() { |
387 return shell_browser_main_parts_->off_the_record_browser_context(); | 388 return shell_browser_main_parts_->off_the_record_browser_context(); |
388 } | 389 } |
389 | 390 |
390 } // namespace content | 391 } // namespace content |
OLD | NEW |