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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2788823002: Add the Mojo implementation of authenticator.mojom's MakeCredential. (Closed)
Patch Set: Address comments on unittests 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..a0fa5cea066e841acd420ac908f7d5d49e9202d1 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -104,6 +104,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"
@@ -153,6 +154,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"
#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"
@@ -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>));

Powered by Google App Engine
This is Rietveld 408576698