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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2788823002: Add the Mojo implementation of authenticator.mojom's MakeCredential. (Closed)
Patch Set: Addressing mkwst comments 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/webauth/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d032d6a83bce6a69d29c6e73ef36ec23ac4a1ef1..28ff7f92b172cd7c013ccd2b98dfef94140a04b8 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -99,6 +99,7 @@
#include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
#include "chrome/browser/ui/webui/log_web_ui_url.h"
#include "chrome/browser/usb/usb_tab_helper.h"
+#include "chrome/browser/webauth/authenticator_web_contents_manager.h"
#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_features.h"
@@ -890,6 +891,17 @@ AppLoadedInTabSource ClassifyAppLoadedInTabSource(
}
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
+void CreateAuthenticatorForWebContents(
+ content::RenderFrameHost* render_frame_host,
+ const service_manager::BindSourceInfo& source_info,
+ webauth::mojom::AuthenticatorRequest request) {
+ 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(RenderFrameHost* render_frame_host,
const service_manager::BindSourceInfo& source_info,
device::mojom::UsbDeviceManagerRequest request) {
@@ -3196,6 +3208,11 @@ void ChromeContentBrowserClient::ExposeInterfacesToFrame(
}
#endif
+ if (base::FeatureList::IsEnabled(features::kWebAuth)) {
+ registry->AddInterface(
+ base::Bind(&CreateAuthenticatorForWebContents, render_frame_host));
+ }
+
#if defined(OS_LINUX) || defined(OS_WIN)
if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) {
registry->AddInterface(base::Bind(&ShareServiceImpl::Create));
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/webauth/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698