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 PublicKeyCredential_h |
| 6 #define PublicKeyCredential_h |
| 7 |
| 8 #include "core/dom/DOMArrayBuffer.h" |
| 9 #include "modules/webauth/AuthenticatorResponse.h" |
| 10 #include "platform/bindings/ScriptWrappable.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class AuthenticatorResponse; |
| 15 |
| 16 class PublicKeyCredential final : public GarbageCollected<PublicKeyCredential>, |
| 17 public ScriptWrappable { |
| 18 DEFINE_WRAPPERTYPEINFO(); |
| 19 |
| 20 public: |
| 21 static PublicKeyCredential* Create(DOMArrayBuffer* raw_id, |
| 22 AuthenticatorResponse* response) { |
| 23 return new PublicKeyCredential(raw_id, response); |
| 24 } |
| 25 |
| 26 DOMArrayBuffer* rawId() const { return raw_id_.Get(); } |
| 27 AuthenticatorResponse* response() const { return response_.Get(); } |
| 28 DEFINE_INLINE_TRACE() { |
| 29 visitor->Trace(raw_id_); |
| 30 visitor->Trace(response_); |
| 31 } |
| 32 |
| 33 private: |
| 34 PublicKeyCredential(DOMArrayBuffer* raw_id, AuthenticatorResponse* response) |
| 35 : raw_id_(raw_id), response_(response) {} |
| 36 |
| 37 const Member<DOMArrayBuffer> raw_id_; |
| 38 const Member<AuthenticatorResponse> response_; |
| 39 }; |
| 40 |
| 41 } // namespace blink |
| 42 |
| 43 #endif // PublicKeyCredential_h |
OLD | NEW |