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" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/files/file.h" | 12 #include "base/files/file.h" |
13 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
14 #include "base/json/json_reader.h" | 14 #include "base/json/json_reader.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/strings/pattern.h" | 17 #include "base/strings/pattern.h" |
18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
19 #include "build/build_config.h" | 19 #include "build/build_config.h" |
20 #include "content/public/browser/client_certificate_delegate.h" | 20 #include "content/public/browser/client_certificate_delegate.h" |
21 #include "content/public/browser/page_navigator.h" | 21 #include "content/public/browser/page_navigator.h" |
22 #include "content/public/browser/render_process_host.h" | 22 #include "content/public/browser/render_process_host.h" |
23 #include "content/public/browser/resource_dispatcher_host.h" | 23 #include "content/public/browser/resource_dispatcher_host.h" |
24 #include "content/public/browser/storage_partition.h" | 24 #include "content/public/browser/storage_partition.h" |
25 #include "content/public/common/content_switches.h" | 25 #include "content/public/common/content_switches.h" |
26 #include "content/public/common/service_names.h" | 26 #include "content/public/common/service_names.h" |
27 #include "content/public/common/url_constants.h" | 27 #include "content/public/common/url_constants.h" |
28 #include "content/public/common/web_preferences.h" | 28 #include "content/public/common/web_preferences.h" |
29 #include "content/public/test/test_mojo_app.h" | 29 #include "content/public/test/test_service.h" |
30 #include "content/shell/browser/shell.h" | 30 #include "content/shell/browser/shell.h" |
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" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 StaticMojoApplicationMap* apps) { | 191 StaticMojoApplicationMap* apps) { |
192 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 192 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
193 content::MojoApplicationInfo app_info; | 193 content::MojoApplicationInfo app_info; |
194 app_info.application_factory = base::Bind(&media::CreateMojoMediaApplication); | 194 app_info.application_factory = base::Bind(&media::CreateMojoMediaApplication); |
195 apps->insert(std::make_pair("service:media", app_info)); | 195 apps->insert(std::make_pair("service:media", app_info)); |
196 #endif | 196 #endif |
197 } | 197 } |
198 | 198 |
199 void ShellContentBrowserClient::RegisterOutOfProcessMojoApplications( | 199 void ShellContentBrowserClient::RegisterOutOfProcessMojoApplications( |
200 OutOfProcessMojoApplicationMap* apps) { | 200 OutOfProcessMojoApplicationMap* apps) { |
201 apps->insert(std::make_pair(kTestMojoAppUrl, | 201 apps->insert(std::make_pair(kTestServiceUrl, |
202 base::UTF8ToUTF16("Test Mojo App"))); | 202 base::UTF8ToUTF16("Test Service"))); |
203 } | 203 } |
204 | 204 |
205 std::unique_ptr<base::Value> | 205 std::unique_ptr<base::Value> |
206 ShellContentBrowserClient::GetServiceManifestOverlay( | 206 ShellContentBrowserClient::GetServiceManifestOverlay( |
207 const std::string& name) { | 207 const std::string& name) { |
208 int id = -1; | 208 int id = -1; |
209 if (name == content::kBrowserMojoApplicationName) | 209 if (name == content::kBrowserMojoApplicationName) |
210 id = IDR_CONTENT_SHELL_BROWSER_MANIFEST_OVERLAY; | 210 id = IDR_CONTENT_SHELL_BROWSER_MANIFEST_OVERLAY; |
211 else if (name == content::kRendererMojoApplicationName) | 211 else if (name == content::kRendererMojoApplicationName) |
212 id = IDR_CONTENT_SHELL_RENDERER_MANIFEST_OVERLAY; | 212 id = IDR_CONTENT_SHELL_RENDERER_MANIFEST_OVERLAY; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 ShellBrowserContext* ShellContentBrowserClient::browser_context() { | 372 ShellBrowserContext* ShellContentBrowserClient::browser_context() { |
373 return shell_browser_main_parts_->browser_context(); | 373 return shell_browser_main_parts_->browser_context(); |
374 } | 374 } |
375 | 375 |
376 ShellBrowserContext* | 376 ShellBrowserContext* |
377 ShellContentBrowserClient::off_the_record_browser_context() { | 377 ShellContentBrowserClient::off_the_record_browser_context() { |
378 return shell_browser_main_parts_->off_the_record_browser_context(); | 378 return shell_browser_main_parts_->off_the_record_browser_context(); |
379 } | 379 } |
380 | 380 |
381 } // namespace content | 381 } // namespace content |
OLD | NEW |