Index: chrome/browser/chrome_content_browser_client.cc |
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
index 1c680d221196c1a0001dfb77db43b509b17be272..6151f8ce1db9a9d9833323036d6a0759ada82327 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -153,6 +153,7 @@ |
#include "components/signin/core/common/profile_management_switches.h" |
#include "components/spellcheck/spellcheck_build_features.h" |
#include "components/startup_metric_utils/browser/startup_metric_host_impl.h" |
+#include "components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h" |
jochen (gone - plz use gerrit)
2017/06/27 15:10:04
unrelated?
|
#include "components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h" |
#include "components/task_scheduler_util/browser/initialization.h" |
#include "components/task_scheduler_util/common/variations_util.h" |
@@ -161,6 +162,7 @@ |
#include "components/url_formatter/url_fixer.h" |
#include "components/variations/variations_associated_data.h" |
#include "components/version_info/version_info.h" |
+#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
|
#include "content/public/browser/browser_child_process_host.h" |
#include "content/public/browser/browser_main_parts.h" |
#include "content/public/browser/browser_ppapi_host.h" |
@@ -799,6 +801,17 @@ AppLoadedInTabSource ClassifyAppLoadedInTabSource( |
} |
#endif // BUILDFLAG(ENABLE_EXTENSIONS) |
+void CreateAuthenticatorForWebContents( |
+ const service_manager::BindSourceInfo& source_info, |
+ webauth::mojom::AuthenticatorRequest request, |
+ content::RenderFrameHost* render_frame_host) { |
+ content::WebContents* web_contents = |
+ content::WebContents::FromRenderFrameHost(render_frame_host); |
+ DCHECK(web_contents); |
+ AuthenticatorWebContentsManager::GetOrCreateForWebContents(web_contents) |
+ ->CreateAuthenticator(render_frame_host, std::move(request)); |
+} |
+ |
void CreateUsbDeviceManager(const service_manager::BindSourceInfo& source_info, |
device::mojom::UsbDeviceManagerRequest request, |
content::RenderFrameHost* render_frame_host) { |
@@ -3340,6 +3353,11 @@ void ChromeContentBrowserClient::InitFrameInterfaces() { |
base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: |
BindSensitiveInputVisibilityService)); |
+ if (base::FeatureList::IsEnabled(features::kWebAuth)) { |
+ frame_interfaces_parameterized_->AddInterface( |
+ base::Bind(&CreateAuthenticatorForWebContents)); |
+ } |
+ |
#if defined(OS_ANDROID) |
frame_interfaces_parameterized_->AddInterface(base::Bind( |
&ForwardToJavaWebContentsRegistry<blink::mojom::InstalledAppProvider>)); |