Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1145)

Unified Diff: third_party/WebKit/Source/modules/webauth/WebAuthentication.h

Issue 2788823002: Add the Mojo implementation of authenticator.mojom's MakeCredential. (Closed)
Patch Set: Added webauth browser feature. Corrected optional mojom struct params. Blink rename. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 152d1692dace0e1155b4714bc2a0cd76053fe945..3fc18381d9613261b718944c608d320a10534c2c 100644
--- a/third_party/WebKit/Source/modules/webauth/WebAuthentication.h
+++ b/third_party/WebKit/Source/modules/webauth/WebAuthentication.h
@@ -29,6 +29,7 @@ class WebAuthentication final
public ContextLifecycleObserver {
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(WebAuthentication);
+ USING_PRE_FINALIZER(WebAuthentication, Dispose);
public:
static WebAuthentication* Create(LocalFrame& frame) {
@@ -45,28 +46,34 @@ class WebAuthentication final
const HeapVector<ScopedCredentialParameters>,
const BufferSource&,
ScopedCredentialOptions&);
+ /* ScriptPromise makeCredential(ScriptState*,
+ const RelyingPartyAccount&,
+ const HeapVector<ScopedCredentialParameters>,
+ const BufferSource&); */
ScriptPromise getAssertion(ScriptState*,
const BufferSource&,
const AuthenticationAssertionOptions&);
- // ContextLifecycleObserver overrides.
- void contextDestroyed(ExecutionContext*) override;
-
webauth::mojom::blink::Authenticator* authenticator() const {
return m_authenticator.get();
}
- void onMakeCredential(ScriptPromiseResolver*,
- Vector<webauth::mojom::blink::ScopedCredentialInfoPtr>);
- bool markRequestComplete(ScriptPromiseResolver*);
-
- void onAuthenticatorConnectionError();
+ // ContextLifecycleObserver overrides.
+ void ContextDestroyed(ExecutionContext*) override;
DECLARE_VIRTUAL_TRACE();
private:
explicit WebAuthentication(LocalFrame&);
+ void onMakeCredential(ScriptPromiseResolver*,
+ webauth::mojom::blink::AuthenticatorStatus,
+ webauth::mojom::blink::ScopedCredentialInfoPtr);
+ ScriptPromise rejectIfNotSupported(ScriptState*);
+ void onAuthenticatorConnectionError();
+ bool markRequestComplete(ScriptPromiseResolver*);
+ void cleanup();
+
webauth::mojom::blink::AuthenticatorPtr m_authenticator;
HeapHashSet<Member<ScriptPromiseResolver>> m_authenticatorRequests;
};

Powered by Google App Engine
This is Rietveld 408576698