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

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

Issue 733463003: Show user credentials chooser bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge with trunk Created 6 years, 1 month 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/password_manager_client.h
diff --git a/components/password_manager/core/browser/password_manager_client.h b/components/password_manager/core/browser/password_manager_client.h
index d2cf54a420d326627f5b02458751a410f7f95117..4953eedadd6ccb9e20ea569ac9cb4bb24497fc99 100644
--- a/components/password_manager/core/browser/password_manager_client.h
+++ b/components/password_manager/core/browser/password_manager_client.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_
+#include "base/callback.h"
#include "base/metrics/field_trial.h"
#include "components/autofill/core/common/password_form.h"
#include "components/password_manager/core/browser/password_store.h"
@@ -13,6 +14,7 @@ class PrefService;
namespace password_manager {
+struct CredentialInfo;
class PasswordFormManager;
class PasswordManagerDriver;
class PasswordStore;
@@ -63,6 +65,15 @@ class PasswordManagerClient {
virtual bool PromptUserToSavePassword(
scoped_ptr<PasswordFormManager> form_to_save) = 0;
+ // Informs the embedder of a password forms that the user should choose from.
+ // Returns true if the prompt is indeed displayed. If the prompt is not
+ // displayed, returns false and does not call |callback|.
+ // |callback| should be invoked with the chosen form.
+ // Note: The implementation takes ownership of all PasswordForms in |forms|.
+ virtual bool PromptUserToChooseCredentials(
+ const std::vector<autofill::PasswordForm*>& forms,
+ base::Callback<void(const CredentialInfo&)> callback) = 0;
+
// Called when a password is saved in an automated fashion. Embedder may
// inform the user that this save has occured.
virtual void AutomaticPasswordSave(

Powered by Google App Engine
This is Rietveld 408576698