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

Unified Diff: public/platform/WebCredentialManagerClient.h

Issue 488993003: Credential Manager: Migrate to WebView client-based approach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
« no previous file with comments | « public/platform/WebCredentialManager.h ('k') | public/web/WebView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebCredentialManagerClient.h
diff --git a/public/platform/WebCredentialManager.h b/public/platform/WebCredentialManagerClient.h
similarity index 61%
rename from public/platform/WebCredentialManager.h
rename to public/platform/WebCredentialManagerClient.h
index 9bd239acf34f2ab8c538681b1c1c342d0102430c..482ec96f70113d7902d77b1dc36d6f7f10d3c033 100644
--- a/public/platform/WebCredentialManager.h
+++ b/public/platform/WebCredentialManagerClient.h
@@ -2,31 +2,32 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WebCredentialManager_h
-#define WebCredentialManager_h
+#ifndef WebCredentialManagerClient_h
+#define WebCredentialManagerClient_h
#include "public/platform/WebCallbacks.h"
#include "public/platform/WebCredentialManagerError.h"
-#include "public/platform/WebString.h"
#include "public/platform/WebVector.h"
namespace blink {
-// WebCredentialManager provides an interface for asking Blink's embedder to
-// respond to `navigator.credentials.*` calls.
-class WebCredentialManager {
+class WebCredential;
+class WebURL;
+
+// WebCredentialManagerClient is an interface which allows an embedder to
+// implement 'navigator.credential.*' calls which are defined in the
+// 'credentialmanager' module.
+class WebCredentialManagerClient {
public:
typedef WebCallbacks<WebCredential, WebCredentialManagerError> RequestCallbacks;
typedef WebCallbacks<void, WebCredentialManagerError> NotificationCallbacks;
- WebCredentialManager() { }
- virtual ~WebCredentialManager() { }
-
- // Ownership of the callback is transferred to the callee for each of the following methods.
- virtual void dispatchFailedSignIn(const WebCredential&, NotificationCallbacks*) { }
- virtual void dispatchSignedIn(const WebCredential&, NotificationCallbacks*) { }
- virtual void dispatchSignedOut(NotificationCallbacks*) { }
- virtual void dispatchRequest(bool zeroClickOnly, const WebVector<WebURL>& federations, RequestCallbacks*) { }
+ // Ownership of the callback is transferred to the callee for each of
+ // the following methods.
+ virtual void dispatchFailedSignIn(const WebCredential&, NotificationCallbacks*) = 0;
pfeldman 2014/08/20 12:23:43 Do you plan on further growing this interface? If
Mike West 2014/08/20 13:05:43 Sounds reasonable. It's not yet clear what the API
+ virtual void dispatchSignedIn(const WebCredential&, NotificationCallbacks*) = 0;
+ virtual void dispatchSignedOut(NotificationCallbacks*) = 0;
+ virtual void dispatchRequest(bool zeroClickOnly, const WebVector<WebURL>& federations, RequestCallbacks*) = 0;
};
} // namespace blink
« no previous file with comments | « public/platform/WebCredentialManager.h ('k') | public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698