OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 WebAuthentication_h |
| 6 #define WebAuthentication_h |
| 7 |
| 8 #include "bindings/core/v8/ArrayBufferOrArrayBufferView.h" |
| 9 #include "bindings/core/v8/ScriptPromise.h" |
| 10 #include "bindings/core/v8/ScriptWrappable.h" |
| 11 #include "core/dom/DOMArrayBuffer.h" |
| 12 #include "modules/webauth/AuthenticationAssertionOptions.h" |
| 13 #include "modules/webauth/RelyingPartyAccount.h" |
| 14 #include "modules/webauth/ScopedCredentialOptions.h" |
| 15 #include "modules/webauth/ScopedCredentialParameters.h" |
| 16 |
| 17 namespace blink { |
| 18 |
| 19 class LocalFrame; |
| 20 class ScriptState; |
| 21 class RelyingPartyAccount; |
| 22 class AuthenticationAssertionOptions; |
| 23 class ScopedCredentialParameters; |
| 24 class ScopedCredentialOptions; |
| 25 |
| 26 typedef ArrayBufferOrArrayBufferView BufferSource; |
| 27 |
| 28 class WebAuthentication final |
| 29 : public GarbageCollectedFinalized<WebAuthentication>, |
| 30 public ScriptWrappable { |
| 31 DEFINE_WRAPPERTYPEINFO(); |
| 32 |
| 33 public: |
| 34 static WebAuthentication* create(LocalFrame& frame) { |
| 35 return new WebAuthentication(frame); |
| 36 } |
| 37 |
| 38 virtual ~WebAuthentication(); |
| 39 |
| 40 void dispose(); |
| 41 |
| 42 ScriptPromise makeCredential(ScriptState*, |
| 43 const RelyingPartyAccount&, |
| 44 const HeapVector<ScopedCredentialParameters>, |
| 45 const BufferSource&, |
| 46 ScopedCredentialOptions&); |
| 47 ScriptPromise getAssertion(ScriptState*, |
| 48 const BufferSource&, |
| 49 const AuthenticationAssertionOptions&); |
| 50 |
| 51 DEFINE_INLINE_TRACE() {} |
| 52 |
| 53 private: |
| 54 explicit WebAuthentication(LocalFrame&); |
| 55 }; |
| 56 |
| 57 } // namespace blink |
| 58 |
| 59 #endif // WebAuthentication_h |
OLD | NEW |