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

Side by Side Diff: third_party/WebKit/Source/modules/webauth/WebAuthentication.h

Issue 2788823002: Add the Mojo implementation of authenticator.mojom's MakeCredential. (Closed)
Patch Set: Removed dispose method 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebAuthentication_h 5 #ifndef WebAuthentication_h
6 #define WebAuthentication_h 6 #define WebAuthentication_h
7 7
8 #include "bindings/core/v8/ArrayBufferOrArrayBufferView.h" 8 #include "bindings/core/v8/ArrayBufferOrArrayBufferView.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 19 matching lines...) Expand all
30 DEFINE_WRAPPERTYPEINFO(); 30 DEFINE_WRAPPERTYPEINFO();
31 USING_GARBAGE_COLLECTED_MIXIN(WebAuthentication); 31 USING_GARBAGE_COLLECTED_MIXIN(WebAuthentication);
32 32
33 public: 33 public:
34 static WebAuthentication* Create(LocalFrame& frame) { 34 static WebAuthentication* Create(LocalFrame& frame) {
35 return new WebAuthentication(frame); 35 return new WebAuthentication(frame);
36 } 36 }
37 37
38 virtual ~WebAuthentication(); 38 virtual ~WebAuthentication();
39 39
40 void Dispose();
41
42 // WebAuthentication.idl 40 // WebAuthentication.idl
43 ScriptPromise makeCredential(ScriptState*, 41 ScriptPromise makeCredential(ScriptState*,
44 const RelyingPartyAccount&, 42 const RelyingPartyAccount&,
45 const HeapVector<ScopedCredentialParameters>, 43 const HeapVector<ScopedCredentialParameters>,
46 const BufferSource&, 44 const BufferSource&,
47 ScopedCredentialOptions&); 45 ScopedCredentialOptions&);
48 ScriptPromise getAssertion(ScriptState*, 46 ScriptPromise getAssertion(ScriptState*,
49 const BufferSource&, 47 const BufferSource&,
50 const AuthenticationAssertionOptions&); 48 const AuthenticationAssertionOptions&);
51 49
52 // ContextLifecycleObserver overrides.
53 void ContextDestroyed(ExecutionContext*) override;
54
55 webauth::mojom::blink::Authenticator* authenticator() const { 50 webauth::mojom::blink::Authenticator* authenticator() const {
56 return m_authenticator.get(); 51 return m_authenticator.get();
57 } 52 }
58 53
59 void onMakeCredential(ScriptPromiseResolver*, 54 // ContextLifecycleObserver overrides.
60 Vector<webauth::mojom::blink::ScopedCredentialInfoPtr>); 55 void ContextDestroyed(ExecutionContext*) override;
61 bool markRequestComplete(ScriptPromiseResolver*);
62
63 void onAuthenticatorConnectionError();
64 56
65 DECLARE_VIRTUAL_TRACE(); 57 DECLARE_VIRTUAL_TRACE();
66 58
67 private: 59 private:
68 explicit WebAuthentication(LocalFrame&); 60 explicit WebAuthentication(LocalFrame&);
69 61
62 void onMakeCredential(ScriptPromiseResolver*,
foolip 2017/05/12 07:55:50 Looks like this CL needs to be rebased to after th
63 webauth::mojom::blink::AuthenticatorStatus,
64 webauth::mojom::blink::ScopedCredentialInfoPtr);
65 ScriptPromise rejectIfNotSupported(ScriptState*);
66 void onAuthenticatorConnectionError();
67 bool markRequestComplete(ScriptPromiseResolver*);
68 void cleanup();
69
70 webauth::mojom::blink::AuthenticatorPtr m_authenticator; 70 webauth::mojom::blink::AuthenticatorPtr m_authenticator;
71 HeapHashSet<Member<ScriptPromiseResolver>> m_authenticatorRequests; 71 HeapHashSet<Member<ScriptPromiseResolver>> m_authenticatorRequests;
72 }; 72 };
73 73
74 } // namespace blink 74 } // namespace blink
75 75
76 #endif // WebAuthentication_h 76 #endif // WebAuthentication_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698