OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ScopedCredentialInfo_h |
| 6 #define ScopedCredentialInfo_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "modules/webauthentication/ScopedCredential.h" |
| 10 #include "modules/webauthentication/WebAuthnAttestation.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class ScopedCredential; |
| 15 |
| 16 class ScopedCredentialInfo final |
| 17 : public GarbageCollectedFinalized<ScopedCredentialInfo>, |
| 18 public ScriptWrappable { |
| 19 DEFINE_WRAPPERTYPEINFO(); |
| 20 |
| 21 public: |
| 22 static ScopedCredentialInfo* create(ScopedCredential* credential, |
| 23 WebAuthnAttestation* attestation) { |
| 24 return new ScopedCredentialInfo(credential, attestation); |
| 25 } |
| 26 |
| 27 ScopedCredentialInfo(ScopedCredential* credential, |
| 28 WebAuthnAttestation* attestation) |
| 29 : m_credential(credential), m_attestation(attestation) {} |
| 30 |
| 31 virtual ~ScopedCredentialInfo() {} |
| 32 |
| 33 ScopedCredential* credential() const { return m_credential; } |
| 34 WebAuthnAttestation* attestation() const { return m_attestation; } |
| 35 |
| 36 DEFINE_INLINE_TRACE() { |
| 37 visitor->trace(m_credential); |
| 38 visitor->trace(m_attestation); |
| 39 } |
| 40 |
| 41 private: |
| 42 const Member<ScopedCredential> m_credential; |
| 43 const Member<WebAuthnAttestation> m_attestation; |
| 44 }; |
| 45 |
| 46 } // namespace blink |
| 47 |
| 48 #endif // ScopedCredentialInfo_h |
OLD | NEW |