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

Unified Diff: Source/modules/credentialmanager/CredentialManagerClient.h

Issue 488993003: Credential Manager: Migrate to WebView client-based approach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: feedback. 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 | « no previous file | Source/modules/credentialmanager/CredentialManagerClient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/credentialmanager/CredentialManagerClient.h
diff --git a/Source/modules/credentialmanager/CredentialManagerClient.h b/Source/modules/credentialmanager/CredentialManagerClient.h
new file mode 100644
index 0000000000000000000000000000000000000000..74a3b136d3ad4bb2234d9f2cb969aa72be07f2b6
--- /dev/null
+++ b/Source/modules/credentialmanager/CredentialManagerClient.h
@@ -0,0 +1,46 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CredentialManagerClient_h
+#define CredentialManagerClient_h
+
+#include "platform/Supplementable.h"
+#include "public/platform/WebCredentialManagerClient.h"
+#include "public/platform/WebVector.h"
+
+namespace blink {
+
+class KURL;
+class Page;
+class WebCredential;
+class WebURL;
+
+// CredentialManagerClient lives as a supplement to Page, and wraps the embedder-provided
+// WebCredentialManagerClient's methods to make them visible to the bindings code.
+class CredentialManagerClient FINAL : public NoBaseWillBeGarbageCollected<CredentialManagerClient>, public WillBeHeapSupplement<Page> {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(CredentialManagerClient);
+public:
+ explicit CredentialManagerClient(WebCredentialManagerClient*);
+ virtual ~CredentialManagerClient();
+
+ static const char* supplementName();
+ static CredentialManagerClient* from(Page*);
+
+ // Ownership of the callback is transferred to the callee for each of
+ // the following methods.
+ virtual void dispatchFailedSignIn(const WebCredential&, WebCredentialManagerClient::NotificationCallbacks*);
+ virtual void dispatchSignedIn(const WebCredential&, WebCredentialManagerClient::NotificationCallbacks*);
+ virtual void dispatchSignedOut(WebCredentialManagerClient::NotificationCallbacks*);
+ virtual void dispatchRequest(bool zeroClickOnly, const WebVector<WebURL>& federations, WebCredentialManagerClient::RequestCallbacks*);
+
+private:
+ WebCredentialManagerClient* m_client;
+};
+
+void provideCredentialManagerClientTo(Page&, CredentialManagerClient*);
+
+} // namespace blink
+
+#endif // CredentialManagerClient_h
+
« no previous file with comments | « no previous file | Source/modules/credentialmanager/CredentialManagerClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698