Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2788823002: Add the Mojo implementation of authenticator.mojom's MakeCredential. (Closed)
Patch Set: Move authenticator manager from chrome/ to components/ Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>));
« chrome/browser/BUILD.gn ('K') | « chrome/browser/DEPS ('k') | components/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698