OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 #include "content/public/browser/child_process_security_policy.h" | 113 #include "content/public/browser/child_process_security_policy.h" |
114 #include "content/public/browser/client_certificate_delegate.h" | 114 #include "content/public/browser/client_certificate_delegate.h" |
115 #include "content/public/browser/render_frame_host.h" | 115 #include "content/public/browser/render_frame_host.h" |
116 #include "content/public/browser/render_process_host.h" | 116 #include "content/public/browser/render_process_host.h" |
117 #include "content/public/browser/render_view_host.h" | 117 #include "content/public/browser/render_view_host.h" |
118 #include "content/public/browser/resource_context.h" | 118 #include "content/public/browser/resource_context.h" |
119 #include "content/public/browser/site_instance.h" | 119 #include "content/public/browser/site_instance.h" |
120 #include "content/public/browser/web_contents.h" | 120 #include "content/public/browser/web_contents.h" |
121 #include "content/public/common/child_process_host.h" | 121 #include "content/public/common/child_process_host.h" |
122 #include "content/public/common/content_descriptors.h" | 122 #include "content/public/common/content_descriptors.h" |
| 123 #include "content/public/common/service_registry.h" |
123 #include "content/public/common/url_utils.h" | 124 #include "content/public/common/url_utils.h" |
124 #include "content/public/common/web_preferences.h" | 125 #include "content/public/common/web_preferences.h" |
125 #include "gin/v8_initializer.h" | 126 #include "gin/v8_initializer.h" |
126 #include "net/base/mime_util.h" | 127 #include "net/base/mime_util.h" |
127 #include "net/cookies/canonical_cookie.h" | 128 #include "net/cookies/canonical_cookie.h" |
128 #include "net/cookies/cookie_options.h" | 129 #include "net/cookies/cookie_options.h" |
129 #include "net/ssl/ssl_cert_request_info.h" | 130 #include "net/ssl/ssl_cert_request_info.h" |
130 #include "ppapi/host/ppapi_host.h" | 131 #include "ppapi/host/ppapi_host.h" |
131 #include "storage/browser/fileapi/external_mount_points.h" | 132 #include "storage/browser/fileapi/external_mount_points.h" |
132 #include "ui/base/l10n/l10n_util.h" | 133 #include "ui/base/l10n/l10n_util.h" |
133 #include "ui/base/resource/resource_bundle.h" | 134 #include "ui/base/resource/resource_bundle.h" |
134 #include "ui/resources/grit/ui_resources.h" | 135 #include "ui/resources/grit/ui_resources.h" |
135 | 136 |
136 #if defined(OS_WIN) | 137 #if defined(OS_WIN) |
137 #include "base/win/windows_version.h" | 138 #include "base/win/windows_version.h" |
138 #include "chrome/browser/chrome_browser_main_win.h" | 139 #include "chrome/browser/chrome_browser_main_win.h" |
139 #include "sandbox/win/src/sandbox_policy.h" | 140 #include "sandbox/win/src/sandbox_policy.h" |
140 #elif defined(OS_MACOSX) | 141 #elif defined(OS_MACOSX) |
141 #include "chrome/browser/chrome_browser_main_mac.h" | 142 #include "chrome/browser/chrome_browser_main_mac.h" |
142 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" | 143 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" |
143 #elif defined(OS_CHROMEOS) | 144 #elif defined(OS_CHROMEOS) |
| 145 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" |
144 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 146 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
145 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" | 147 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" |
146 #include "chrome/browser/chromeos/file_manager/app_id.h" | 148 #include "chrome/browser/chromeos/file_manager/app_id.h" |
147 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" | 149 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" |
148 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" | 150 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" |
149 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h" | 151 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h" |
150 #include "chrome/browser/chromeos/login/startup_utils.h" | 152 #include "chrome/browser/chromeos/login/startup_utils.h" |
151 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 153 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
152 #include "chrome/browser/chromeos/system/input_device_settings.h" | 154 #include "chrome/browser/chromeos/system/input_device_settings.h" |
153 #include "chromeos/chromeos_switches.h" | 155 #include "chromeos/chromeos_switches.h" |
(...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2323 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES, | 2325 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES, |
2324 sandbox::TargetPolicy::HANDLES_DUP_ANY, | 2326 sandbox::TargetPolicy::HANDLES_DUP_ANY, |
2325 L"File"); | 2327 L"File"); |
2326 if (result != sandbox::SBOX_ALL_OK) { | 2328 if (result != sandbox::SBOX_ALL_OK) { |
2327 *success = false; | 2329 *success = false; |
2328 return; | 2330 return; |
2329 } | 2331 } |
2330 } | 2332 } |
2331 #endif | 2333 #endif |
2332 | 2334 |
| 2335 void ChromeContentBrowserClient::OverrideRenderFrameMojoServices( |
| 2336 content::ServiceRegistry* registry, |
| 2337 content::RenderFrameHost* render_frame_host) { |
| 2338 #if defined(OS_CHROMEOS) |
| 2339 registry->AddService( |
| 2340 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, |
| 2341 render_frame_host)); |
| 2342 #endif |
| 2343 } |
| 2344 |
2333 void ChromeContentBrowserClient::OpenURL( | 2345 void ChromeContentBrowserClient::OpenURL( |
2334 content::BrowserContext* browser_context, | 2346 content::BrowserContext* browser_context, |
2335 const content::OpenURLParams& params, | 2347 const content::OpenURLParams& params, |
2336 const base::Callback<void(content::WebContents*)>& callback) { | 2348 const base::Callback<void(content::WebContents*)>& callback) { |
2337 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2349 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2338 | 2350 |
2339 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 2351 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
2340 NavigateParams nav_params(Profile::FromBrowserContext(browser_context), | 2352 NavigateParams nav_params(Profile::FromBrowserContext(browser_context), |
2341 params.url, | 2353 params.url, |
2342 params.transition); | 2354 params.transition); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2434 switches::kDisableWebRtcEncryption, | 2446 switches::kDisableWebRtcEncryption, |
2435 }; | 2447 }; |
2436 to_command_line->CopySwitchesFrom(from_command_line, | 2448 to_command_line->CopySwitchesFrom(from_command_line, |
2437 kWebRtcDevSwitchNames, | 2449 kWebRtcDevSwitchNames, |
2438 arraysize(kWebRtcDevSwitchNames)); | 2450 arraysize(kWebRtcDevSwitchNames)); |
2439 } | 2451 } |
2440 } | 2452 } |
2441 #endif // defined(ENABLE_WEBRTC) | 2453 #endif // defined(ENABLE_WEBRTC) |
2442 | 2454 |
2443 } // namespace chrome | 2455 } // namespace chrome |
OLD | NEW |