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 |