Chromium Code Reviews| 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 <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 #include "components/prefs/pref_service.h" | 146 #include "components/prefs/pref_service.h" |
| 147 #include "components/prefs/scoped_user_pref_update.h" | 147 #include "components/prefs/scoped_user_pref_update.h" |
| 148 #include "components/rappor/public/rappor_utils.h" | 148 #include "components/rappor/public/rappor_utils.h" |
| 149 #include "components/rappor/rappor_recorder_impl.h" | 149 #include "components/rappor/rappor_recorder_impl.h" |
| 150 #include "components/rappor/rappor_service_impl.h" | 150 #include "components/rappor/rappor_service_impl.h" |
| 151 #include "components/safe_browsing/common/safe_browsing_prefs.h" | 151 #include "components/safe_browsing/common/safe_browsing_prefs.h" |
| 152 #include "components/security_interstitials/core/ssl_error_ui.h" | 152 #include "components/security_interstitials/core/ssl_error_ui.h" |
| 153 #include "components/signin/core/common/profile_management_switches.h" | 153 #include "components/signin/core/common/profile_management_switches.h" |
| 154 #include "components/spellcheck/spellcheck_build_features.h" | 154 #include "components/spellcheck/spellcheck_build_features.h" |
| 155 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" | 155 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" |
| 156 #include "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h" | |
|
jochen (gone - plz use gerrit)
2017/06/27 15:10:04
unrelated?
| |
| 156 #include "components/subresource_filter/content/browser/content_subresource_filt er_throttle_manager.h" | 157 #include "components/subresource_filter/content/browser/content_subresource_filt er_throttle_manager.h" |
| 157 #include "components/task_scheduler_util/browser/initialization.h" | 158 #include "components/task_scheduler_util/browser/initialization.h" |
| 158 #include "components/task_scheduler_util/common/variations_util.h" | 159 #include "components/task_scheduler_util/common/variations_util.h" |
| 159 #include "components/translate/core/common/translate_switches.h" | 160 #include "components/translate/core/common/translate_switches.h" |
| 160 #include "components/ukm/ukm_interface.h" | 161 #include "components/ukm/ukm_interface.h" |
| 161 #include "components/url_formatter/url_fixer.h" | 162 #include "components/url_formatter/url_fixer.h" |
| 162 #include "components/variations/variations_associated_data.h" | 163 #include "components/variations/variations_associated_data.h" |
| 163 #include "components/version_info/version_info.h" | 164 #include "components/version_info/version_info.h" |
| 165 #include "components/webauth/authenticator_web_contents_manager.h" | |
|
jochen (gone - plz use gerrit)
2017/06/27 15:10:05
if you don't depend on webauth on android, you can
| |
| 164 #include "content/public/browser/browser_child_process_host.h" | 166 #include "content/public/browser/browser_child_process_host.h" |
| 165 #include "content/public/browser/browser_main_parts.h" | 167 #include "content/public/browser/browser_main_parts.h" |
| 166 #include "content/public/browser/browser_ppapi_host.h" | 168 #include "content/public/browser/browser_ppapi_host.h" |
| 167 #include "content/public/browser/browser_thread.h" | 169 #include "content/public/browser/browser_thread.h" |
| 168 #include "content/public/browser/browser_url_handler.h" | 170 #include "content/public/browser/browser_url_handler.h" |
| 169 #include "content/public/browser/browsing_data_remover.h" | 171 #include "content/public/browser/browsing_data_remover.h" |
| 170 #include "content/public/browser/child_process_data.h" | 172 #include "content/public/browser/child_process_data.h" |
| 171 #include "content/public/browser/child_process_security_policy.h" | 173 #include "content/public/browser/child_process_security_policy.h" |
| 172 #include "content/public/browser/client_certificate_delegate.h" | 174 #include "content/public/browser/client_certificate_delegate.h" |
| 173 #include "content/public/browser/navigation_handle.h" | 175 #include "content/public/browser/navigation_handle.h" |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 792 } | 794 } |
| 793 } | 795 } |
| 794 // The forbidden app URL was being opened by a different app or extension. | 796 // The forbidden app URL was being opened by a different app or extension. |
| 795 return APP_LOADED_IN_TAB_SOURCE_OTHER_EXTENSION; | 797 return APP_LOADED_IN_TAB_SOURCE_OTHER_EXTENSION; |
| 796 } | 798 } |
| 797 // The forbidden app URL was being opened by a non-extension page (e.g. http). | 799 // The forbidden app URL was being opened by a non-extension page (e.g. http). |
| 798 return APP_LOADED_IN_TAB_SOURCE_OTHER; | 800 return APP_LOADED_IN_TAB_SOURCE_OTHER; |
| 799 } | 801 } |
| 800 #endif // BUILDFLAG(ENABLE_EXTENSIONS) | 802 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
| 801 | 803 |
| 804 void CreateAuthenticatorForWebContents( | |
| 805 const service_manager::BindSourceInfo& source_info, | |
| 806 webauth::mojom::AuthenticatorRequest request, | |
| 807 content::RenderFrameHost* render_frame_host) { | |
| 808 content::WebContents* web_contents = | |
| 809 content::WebContents::FromRenderFrameHost(render_frame_host); | |
| 810 DCHECK(web_contents); | |
| 811 AuthenticatorWebContentsManager::GetOrCreateForWebContents(web_contents) | |
| 812 ->CreateAuthenticator(render_frame_host, std::move(request)); | |
| 813 } | |
| 814 | |
| 802 void CreateUsbDeviceManager(const service_manager::BindSourceInfo& source_info, | 815 void CreateUsbDeviceManager(const service_manager::BindSourceInfo& source_info, |
| 803 device::mojom::UsbDeviceManagerRequest request, | 816 device::mojom::UsbDeviceManagerRequest request, |
| 804 content::RenderFrameHost* render_frame_host) { | 817 content::RenderFrameHost* render_frame_host) { |
| 805 #if BUILDFLAG(ENABLE_EXTENSIONS) | 818 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 806 if (render_frame_host->GetSiteInstance()->GetSiteURL().SchemeIs( | 819 if (render_frame_host->GetSiteInstance()->GetSiteURL().SchemeIs( |
| 807 extensions::kExtensionScheme)) { | 820 extensions::kExtensionScheme)) { |
| 808 return; | 821 return; |
| 809 } | 822 } |
| 810 #endif | 823 #endif |
| 811 | 824 |
| (...skipping 2521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3333 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver)); | 3346 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver)); |
| 3334 | 3347 |
| 3335 frame_interfaces_parameterized_->AddInterface( | 3348 frame_interfaces_parameterized_->AddInterface( |
| 3336 base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: | 3349 base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: |
| 3337 BindPasswordManagerDriver)); | 3350 BindPasswordManagerDriver)); |
| 3338 | 3351 |
| 3339 frame_interfaces_parameterized_->AddInterface( | 3352 frame_interfaces_parameterized_->AddInterface( |
| 3340 base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: | 3353 base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: |
| 3341 BindSensitiveInputVisibilityService)); | 3354 BindSensitiveInputVisibilityService)); |
| 3342 | 3355 |
| 3356 if (base::FeatureList::IsEnabled(features::kWebAuth)) { | |
| 3357 frame_interfaces_parameterized_->AddInterface( | |
| 3358 base::Bind(&CreateAuthenticatorForWebContents)); | |
| 3359 } | |
| 3360 | |
| 3343 #if defined(OS_ANDROID) | 3361 #if defined(OS_ANDROID) |
| 3344 frame_interfaces_parameterized_->AddInterface(base::Bind( | 3362 frame_interfaces_parameterized_->AddInterface(base::Bind( |
| 3345 &ForwardToJavaWebContentsRegistry<blink::mojom::InstalledAppProvider>)); | 3363 &ForwardToJavaWebContentsRegistry<blink::mojom::InstalledAppProvider>)); |
| 3346 frame_interfaces_parameterized_->AddInterface( | 3364 frame_interfaces_parameterized_->AddInterface( |
| 3347 base::Bind(&ForwardToJavaFrameRegistry<payments::mojom::PaymentRequest>)); | 3365 base::Bind(&ForwardToJavaFrameRegistry<payments::mojom::PaymentRequest>)); |
| 3348 #else | 3366 #else |
| 3349 if (base::FeatureList::IsEnabled(features::kWebPayments)) { | 3367 if (base::FeatureList::IsEnabled(features::kWebPayments)) { |
| 3350 frame_interfaces_parameterized_->AddInterface( | 3368 frame_interfaces_parameterized_->AddInterface( |
| 3351 base::Bind(&payments::CreatePaymentRequest)); | 3369 base::Bind(&payments::CreatePaymentRequest)); |
| 3352 } | 3370 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3468 // displayed URL when rewriting chrome://help to chrome://settings/help. | 3486 // displayed URL when rewriting chrome://help to chrome://settings/help. |
| 3469 return url->SchemeIs(content::kChromeUIScheme) && | 3487 return url->SchemeIs(content::kChromeUIScheme) && |
| 3470 url->host() == chrome::kChromeUISettingsHost; | 3488 url->host() == chrome::kChromeUISettingsHost; |
| 3471 } | 3489 } |
| 3472 | 3490 |
| 3473 // static | 3491 // static |
| 3474 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3492 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3475 const storage::QuotaSettings* settings) { | 3493 const storage::QuotaSettings* settings) { |
| 3476 g_default_quota_settings = settings; | 3494 g_default_quota_settings = settings; |
| 3477 } | 3495 } |
| OLD | NEW |