Chromium Code Reviews| 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>, | |
|
Mike West
2017/06/30 08:06:36
Does this compile? You're inheriting from `Credent
kpaulhamus
2017/06/30 10:59:40
Yeah, it does compile, and run. Is that a bug?
| |
| 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 PublicKeyCredential(DOMArrayBuffer* raw_id, AuthenticatorResponse* response) | |
| 27 : raw_id_(raw_id), response_(response) {} | |
|
Mike West
2017/06/30 08:06:36
Private.
kpaulhamus
2017/06/30 10:59:40
Done.
| |
| 28 | |
| 29 DOMArrayBuffer* rawId() const { return raw_id_.Get(); } | |
| 30 AuthenticatorResponse* response() const { return response_.Get(); } | |
| 31 DEFINE_INLINE_TRACE() { | |
| 32 visitor->Trace(raw_id_); | |
| 33 visitor->Trace(response_); | |
| 34 } | |
| 35 | |
| 36 private: | |
| 37 const Member<DOMArrayBuffer> raw_id_; | |
| 38 const Member<AuthenticatorResponse> response_; | |
| 39 }; | |
| 40 | |
| 41 } // namespace blink | |
| 42 | |
| 43 #endif // PublicKeyCredential_h | |
| OLD | NEW |