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

Unified Diff: chrome/browser/webauth/authenticator_web_contents_manager.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/webauth/authenticator_web_contents_manager.h ('k') | components/webauth/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webauth/authenticator_web_contents_manager.cc
diff --git a/chrome/browser/webauth/authenticator_web_contents_manager.cc b/chrome/browser/webauth/authenticator_web_contents_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2f6b02f22bfa126649d77f7c9e00d14e8ab7d3d3
--- /dev/null
+++ b/chrome/browser/webauth/authenticator_web_contents_manager.cc
@@ -0,0 +1,38 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/webauth/authenticator_web_contents_manager.h"
+
+#include <utility>
+
+#include "base/logging.h"
+#include "base/memory/ptr_util.h"
+#include "components/webauth/authenticator_impl.h"
+#include "content/public/browser/web_contents.h"
+
+DEFINE_WEB_CONTENTS_USER_DATA_KEY(AuthenticatorWebContentsManager);
+
+AuthenticatorWebContentsManager::~AuthenticatorWebContentsManager() {}
+
+AuthenticatorWebContentsManager*
+AuthenticatorWebContentsManager::GetOrCreateForWebContents(
+ content::WebContents* web_contents) {
+ DCHECK(web_contents);
+ // Does nothing if the manager instance already exists.
+ AuthenticatorWebContentsManager* manager = FromWebContents(web_contents);
+ if (!manager) {
+ CreateForWebContents(web_contents);
+ manager = FromWebContents(web_contents);
+ }
+ return manager;
+}
+
+void AuthenticatorWebContentsManager::CreateAuthenticator(
+ content::RenderFrameHost* render_frame_host,
+ mojo::InterfaceRequest<webauth::mojom::Authenticator> request) {
+ webauth::AuthenticatorImpl::Create(render_frame_host, std::move(request));
+}
+
+AuthenticatorWebContentsManager::AuthenticatorWebContentsManager(
+ content::WebContents* web_contents) {}
« no previous file with comments | « chrome/browser/webauth/authenticator_web_contents_manager.h ('k') | components/webauth/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698