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

Side by Side Diff: third_party/WebKit/public/platform/WebCredentialManagerClient.h

Issue 2864493003: Deprecate CredentialRequestOptions.unmediated in favor mediation enum (Closed)
Patch Set: Rebase Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 WebCredentialManagerClient_h 5 #ifndef WebCredentialManagerClient_h
6 #define WebCredentialManagerClient_h 6 #define WebCredentialManagerClient_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebCredentialManagerError.h" 9 #include "public/platform/WebCredentialManagerError.h"
10 #include "public/platform/WebCredentialMediationRequirement.h"
10 #include "public/platform/WebVector.h" 11 #include "public/platform/WebVector.h"
11 12
12 #include <memory> 13 #include <memory>
13 14
14 namespace blink { 15 namespace blink {
15 16
16 class WebCredential; 17 class WebCredential;
17 class WebURL; 18 class WebURL;
18 19
19 // WebCredentialManagerClient is an interface which allows an embedder to 20 // WebCredentialManagerClient is an interface which allows an embedder to
20 // implement 'navigator.credential.*' calls which are defined in the 21 // implement 'navigator.credential.*' calls which are defined in the
21 // 'credentialmanager' module. 22 // 'credentialmanager' module.
22 class WebCredentialManagerClient { 23 class WebCredentialManagerClient {
23 public: 24 public:
24 typedef WebCallbacks<std::unique_ptr<WebCredential>, 25 typedef WebCallbacks<std::unique_ptr<WebCredential>,
25 WebCredentialManagerError> 26 WebCredentialManagerError>
26 RequestCallbacks; 27 RequestCallbacks;
27 typedef WebCallbacks<void, WebCredentialManagerError> NotificationCallbacks; 28 typedef WebCallbacks<void, WebCredentialManagerError> NotificationCallbacks;
28 29
29 // Ownership of the callback is transferred to the callee for each of 30 // Ownership of the callback is transferred to the callee for each of
30 // the following methods. 31 // the following methods.
31 virtual void DispatchFailedSignIn(const WebCredential&, 32 virtual void DispatchFailedSignIn(const WebCredential&,
32 NotificationCallbacks*) {} 33 NotificationCallbacks*) {}
33 virtual void DispatchStore(const WebCredential&, NotificationCallbacks*) {} 34 virtual void DispatchStore(const WebCredential&, NotificationCallbacks*) {}
34 virtual void DispatchRequireUserMediation(NotificationCallbacks*) {} 35 virtual void DispatchRequireUserMediation(NotificationCallbacks*) {}
35 virtual void DispatchGet(bool zero_click_only, 36 virtual void DispatchGet(WebCredentialMediationRequirement mediation,
36 bool include_passwords, 37 bool include_passwords,
37 const WebVector<WebURL>& federations, 38 const WebVector<WebURL>& federations,
38 RequestCallbacks*) {} 39 RequestCallbacks*) {}
39 40
40 protected: 41 protected:
41 virtual ~WebCredentialManagerClient() {} 42 virtual ~WebCredentialManagerClient() {}
42 }; 43 };
43 44
44 } // namespace blink 45 } // namespace blink
45 46
46 #endif // WebCredentialManager_h 47 #endif // WebCredentialManager_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/BUILD.gn ('k') | third_party/WebKit/public/platform/WebCredentialMediationRequirement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698