Index: third_party/WebKit/Source/modules/webauth/PublicKeyCredential.h |
diff --git a/third_party/WebKit/Source/modules/webauth/PublicKeyCredential.h b/third_party/WebKit/Source/modules/webauth/PublicKeyCredential.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4b14c133f4d6d4a7843f0b54a808752db13b2503 |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/webauth/PublicKeyCredential.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef PublicKeyCredential_h |
+#define PublicKeyCredential_h |
+ |
+#include "core/dom/DOMArrayBuffer.h" |
+#include "modules/webauth/AuthenticatorResponse.h" |
+#include "platform/bindings/ScriptWrappable.h" |
+ |
+namespace blink { |
+ |
+class AuthenticatorResponse; |
+ |
+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?
|
+ public ScriptWrappable { |
+ DEFINE_WRAPPERTYPEINFO(); |
+ |
+ public: |
+ static PublicKeyCredential* Create(DOMArrayBuffer* raw_id, |
+ AuthenticatorResponse* response) { |
+ return new PublicKeyCredential(raw_id, response); |
+ } |
+ |
+ PublicKeyCredential(DOMArrayBuffer* raw_id, AuthenticatorResponse* response) |
+ : raw_id_(raw_id), response_(response) {} |
Mike West
2017/06/30 08:06:36
Private.
kpaulhamus
2017/06/30 10:59:40
Done.
|
+ |
+ DOMArrayBuffer* rawId() const { return raw_id_.Get(); } |
+ AuthenticatorResponse* response() const { return response_.Get(); } |
+ DEFINE_INLINE_TRACE() { |
+ visitor->Trace(raw_id_); |
+ visitor->Trace(response_); |
+ } |
+ |
+ private: |
+ const Member<DOMArrayBuffer> raw_id_; |
+ const Member<AuthenticatorResponse> response_; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // PublicKeyCredential_h |