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

Side by Side Diff: third_party/WebKit/Source/modules/webauthentication/WebAuthnAttestation.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 WebAuthnAttestation_h
6 #define WebAuthnAttestation_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/dom/DOMArrayBuffer.h"
10
11 namespace blink {
12
13 class WebAuthnAttestation final
14 : public GarbageCollectedFinalized<WebAuthnAttestation>,
15 public ScriptWrappable {
16 DEFINE_WRAPPERTYPEINFO();
17
18 public:
19 static WebAuthnAttestation* create(const String& format,
20 DOMArrayBuffer* clientData,
21 DOMArrayBuffer* authenticatorData,
22 ScriptValue attestation) {
23 return new WebAuthnAttestation(format, clientData, authenticatorData,
24 attestation);
25 }
26
27 explicit WebAuthnAttestation(const String& format,
28 DOMArrayBuffer* clientData,
29 DOMArrayBuffer* authenticatorData,
30 ScriptValue attestation)
31 : m_format(format),
32 m_clientData(clientData),
33 m_authenticatorData(authenticatorData),
34 m_attestation(attestation) {}
35
36 virtual ~WebAuthnAttestation() {}
37
38 const String format() const { return m_format; }
39 DOMArrayBuffer* clientData() const { return m_clientData.get(); }
40 DOMArrayBuffer* authenticatorData() const {
41 return m_authenticatorData.get();
42 }
43 ScriptValue attestation() const { return m_attestation; }
44
45 DEFINE_INLINE_TRACE() {
46 visitor->trace(m_clientData);
47 visitor->trace(m_authenticatorData);
48 }
49
50 private:
51 const String m_format;
52 const Member<DOMArrayBuffer> m_clientData;
53 const Member<DOMArrayBuffer> m_authenticatorData;
54 const ScriptValue m_attestation;
55 };
56
57 } // namespace blink
58
59 #endif // WebAuthnAttestation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698