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

Side by Side Diff: third_party/WebKit/Source/modules/webauthentication/ScopedCredentialInfo.h

Issue 2533863002: Add WebAuthn bindings and client interface. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698