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

Unified Diff: components/password_manager/core/browser/credential_manager_dispatcher.h

Issue 615483002: Credential Manager: Extract browser-side IPC to a stand-alone dispatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 6 years, 3 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: components/password_manager/core/browser/credential_manager_dispatcher.h
diff --git a/components/password_manager/core/browser/credential_manager_dispatcher.h b/components/password_manager/core/browser/credential_manager_dispatcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..b36f80730ad35a93cd1f28f8ec8519c0dc4ee1f0
--- /dev/null
+++ b/components/password_manager/core/browser/credential_manager_dispatcher.h
@@ -0,0 +1,48 @@
+// 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_CLIENT_H_
+#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_CLIENT_H_
+
+#include <vector>
+
+#include "base/macros.h"
+#include "base/strings/string16.h"
+
+class GURL;
+
+namespace password_manager {
+
+struct CredentialInfo;
+
+class CredentialManagerDispatcher {
+ public:
+ CredentialManagerDispatcher() {}
+ virtual ~CredentialManagerDispatcher() {}
+
+ // Called in response to an IPC from the renderer, triggered by a page's call
+ // to 'navigator.credentials.notifyFailedSignIn'.
+ virtual void OnNotifyFailedSignIn(int request_id, const CredentialInfo&) {}
+
+ // Called in response to an IPC from the renderer, triggered by a page's call
+ // to 'navigator.credentials.notifySignedIn'.
+ virtual void OnNotifySignedIn(int request_id, const CredentialInfo&) {}
+
+ // Called in response to an IPC from the renderer, triggered by a page's call
+ // to 'navigator.credentials.notifySignedOut'.
+ virtual void OnNotifySignedOut(int request_id) {}
+
+ // Called in response to an IPC from the renderer, triggered by a page's call
+ // to 'navigator.credentials.request'.
+ virtual void OnRequestCredential(int request_id,
+ bool zero_click_only,
+ const std::vector<GURL>& federations) {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CredentialManagerDispatcher);
+};
+
+} // namespace password_manager
+
+#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_CLIENT_H_
« no previous file with comments | « components/password_manager/core/browser/BUILD.gn ('k') | components/password_manager/core/browser/password_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698