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

Unified Diff: third_party/WebKit/Source/modules/webauthentication/ScopedCredentialInfo.h

Issue 2533863002: Add WebAuthn bindings and client interface. (Closed)
Patch Set: Created 4 years, 1 month 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: third_party/WebKit/Source/modules/webauthentication/ScopedCredentialInfo.h
diff --git a/third_party/WebKit/Source/modules/webauthentication/ScopedCredentialInfo.h b/third_party/WebKit/Source/modules/webauthentication/ScopedCredentialInfo.h
new file mode 100644
index 0000000000000000000000000000000000000000..31a958c947ef9884acc440cf29cac8a090f75ee6
--- /dev/null
+++ b/third_party/WebKit/Source/modules/webauthentication/ScopedCredentialInfo.h
@@ -0,0 +1,48 @@
+// Copyright 2016 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.
+
+#ifndef ScopedCredentialInfo_h
+#define ScopedCredentialInfo_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "modules/webauthentication/ScopedCredential.h"
+#include "modules/webauthentication/WebAuthnAttestation.h"
+
+namespace blink {
+
+class ScopedCredential;
+
+class ScopedCredentialInfo final
+ : public GarbageCollectedFinalized<ScopedCredentialInfo>,
+ public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+
+ public:
+ static ScopedCredentialInfo* create(ScopedCredential* credential,
+ WebAuthnAttestation* attestation) {
+ return new ScopedCredentialInfo(credential, attestation);
+ }
+
+ ScopedCredentialInfo(ScopedCredential* credential,
+ WebAuthnAttestation* attestation)
+ : m_credential(credential), m_attestation(attestation) {}
+
+ virtual ~ScopedCredentialInfo() {}
+
+ ScopedCredential* credential() const { return m_credential; }
+ WebAuthnAttestation* attestation() const { return m_attestation; }
+
+ DEFINE_INLINE_TRACE() {
+ visitor->trace(m_credential);
+ visitor->trace(m_attestation);
+ }
+
+ private:
+ const Member<ScopedCredential> m_credential;
+ const Member<WebAuthnAttestation> m_attestation;
+};
+
+} // namespace blink
+
+#endif // ScopedCredentialInfo_h

Powered by Google App Engine
This is Rietveld 408576698