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 ba0134f14636caaa121b4b5e22fd3fd30ee11555..4c37cac9a51896251ce56377183d62f10767d819 100644 |
| --- a/third_party/WebKit/Source/modules/webauth/WebAuthentication.h |
| +++ b/third_party/WebKit/Source/modules/webauth/WebAuthentication.h |
| @@ -8,27 +8,28 @@ |
| #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 "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,6 +40,7 @@ class WebAuthentication final |
| void Dispose(); |
| + // WebAuthentication.idl |
| ScriptPromise makeCredential(ScriptState*, |
| const RelyingPartyAccount&, |
| const HeapVector<ScopedCredentialParameters>, |
| @@ -48,12 +50,27 @@ class WebAuthentication final |
| const BufferSource&, |
| const AuthenticationAssertionOptions&); |
| - DEFINE_INLINE_TRACE() {} |
| + // ContextLifecycleObserver overrides. |
| + void ContextDestroyed(ExecutionContext*) override; |
| + |
| + webauth::mojom::blink::Authenticator* authenticator() const { |
|
dcheng
2017/04/25 12:52:14
Per the Blink style guide, these functions should
kpaulhamus
2017/05/03 17:00:45
Done.
|
| + return m_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 m_authenticator; |
|
dcheng
2017/04/25 12:52:14
authenticator_, authenticator_requests_
kpaulhamus
2017/05/03 17:00:45
Done.
|
| + HeapHashSet<Member<ScriptPromiseResolver>> m_authenticatorRequests; |
| +}; |
| } // namespace blink |
| #endif // WebAuthentication_h |