Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webauth/WebAuthentication.h |
| diff --git a/third_party/WebKit/Source/modules/webauth/WebAuthentication.h b/third_party/WebKit/Source/modules/webauth/WebAuthentication.h |
| index 7f36dc9c69ae081d762f3caaa35a64f4bb9e510f..e556a299e47f404d969139b29c41901ed041e2a8 100644 |
| --- a/third_party/WebKit/Source/modules/webauth/WebAuthentication.h |
| +++ b/third_party/WebKit/Source/modules/webauth/WebAuthentication.h |
| @@ -7,28 +7,29 @@ |
| #include "bindings/core/v8/ArrayBufferOrArrayBufferView.h" |
| #include "bindings/core/v8/ScriptPromise.h" |
| +#include "bindings/core/v8/ScriptWrappable.h" |
| +#include "components/webauth/authenticator.mojom-blink.h" |
| +#include "core/dom/ContextLifecycleObserver.h" |
| #include "core/dom/DOMArrayBuffer.h" |
| #include "modules/webauth/AuthenticationAssertionOptions.h" |
| -#include "modules/webauth/RelyingPartyAccount.h" |
| -#include "modules/webauth/ScopedCredentialOptions.h" |
| -#include "modules/webauth/ScopedCredentialParameters.h" |
| -#include "platform/bindings/ScriptWrappable.h" |
| +#include "modules/webauth/ScopedCredentialInfo.h" |
| namespace blink { |
| -class LocalFrame; |
| -class ScriptState; |
| class RelyingPartyAccount; |
| class AuthenticationAssertionOptions; |
| -class ScopedCredentialParameters; |
| class ScopedCredentialOptions; |
| +class ScopedCredentialParameters; |
| +class ScriptPromiseResolver; |
| typedef ArrayBufferOrArrayBufferView BufferSource; |
| class WebAuthentication final |
| : public GarbageCollectedFinalized<WebAuthentication>, |
| - public ScriptWrappable { |
| + public ScriptWrappable, |
| + public ContextLifecycleObserver { |
| DEFINE_WRAPPERTYPEINFO(); |
| + USING_GARBAGE_COLLECTED_MIXIN(WebAuthentication); |
| public: |
| static WebAuthentication* Create(LocalFrame& frame) { |
| @@ -39,21 +40,37 @@ class WebAuthentication final |
| void Dispose(); |
| - ScriptPromise makeCredential(ScriptState*, |
| + // WebAuthentication.idl |
| + ScriptPromise MakeCredential(ScriptState*, |
| const RelyingPartyAccount&, |
| const HeapVector<ScopedCredentialParameters>, |
| const BufferSource&, |
| ScopedCredentialOptions&); |
| - ScriptPromise getAssertion(ScriptState*, |
| + ScriptPromise GetAssertion(ScriptState*, |
| const BufferSource&, |
| const AuthenticationAssertionOptions&); |
| - DEFINE_INLINE_TRACE() {} |
| + // ContextLifecycleObserver overrides. |
| + void ContextDestroyed(ExecutionContext*) override; |
| + |
| + webauth::mojom::blink::Authenticator* Authenticator() const { |
| + return authenticator_.get(); |
| + } |
| + |
| + void OnMakeCredential(ScriptPromiseResolver*, |
| + Vector<webauth::mojom::blink::ScopedCredentialInfoPtr>); |
| + bool MarkRequestComplete(ScriptPromiseResolver*); |
| + |
| + void OnAuthenticatorConnectionError(); |
| + |
| + DECLARE_VIRTUAL_TRACE(); |
| private: |
| explicit WebAuthentication(LocalFrame&); |
| -}; |
| + webauth::mojom::blink::AuthenticatorPtr authenticator_; |
| + HeapHashSet<Member<ScriptPromiseResolver>> authenticatorRequests_; |
|
dcheng
2017/05/04 07:22:35
Nit: authenticator_requests_ (no camel case)
kpaulhamus
2017/05/05 01:32:36
Done.
|
| +}; |
| } // namespace blink |
| #endif // WebAuthentication_h |