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

Side by Side Diff: components/password_manager/core/browser/password_manager_client.h

Issue 2915763003: [Password Manager] Show omnibox icon and anchored prompt once user start typing password (Closed)
Patch Set: Rebase Created 3 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 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // 2.A change password form was submitted and the user has more than one 87 // 2.A change password form was submitted and the user has more than one
88 // stored credential. Then we shouldn't expect anything from 88 // stored credential. Then we shouldn't expect anything from
89 // form_to_save.pending_credentials() except correct origin, since we don't 89 // form_to_save.pending_credentials() except correct origin, since we don't
90 // know which credentials should be updated. 90 // know which credentials should be updated.
91 // 3.A sign-in password form was submitted with a password different from 91 // 3.A sign-in password form was submitted with a password different from
92 // the stored one. In this case form_to_save.password_overridden() == true 92 // the stored one. In this case form_to_save.password_overridden() == true
93 // and form_to_save.pending_credentials() should correspond to the credential 93 // and form_to_save.pending_credentials() should correspond to the credential
94 // that was overidden. 94 // that was overidden.
95 virtual bool PromptUserToSaveOrUpdatePassword( 95 virtual bool PromptUserToSaveOrUpdatePassword(
96 std::unique_ptr<PasswordFormManager> form_to_save, 96 std::unique_ptr<PasswordFormManager> form_to_save,
97 bool update_password) = 0; 97 bool is_update) = 0;
98
99 // Informs the embedder that the user started typing a password and a password
100 // prompt should be available on click on the omnibox icon.
101 virtual void ShowManualFallbackForSaving(
102 std::unique_ptr<PasswordFormManager> form_to_save,
103 bool has_generated_password,
104 bool is_update) = 0;
105
106 // Informs the embedder that the user cleared the password field and the
107 // fallback for password saving should be not available.
108 virtual void HideManualFallbackForSaving() = 0;
98 109
99 // Informs the embedder of a password forms that the user should choose from. 110 // Informs the embedder of a password forms that the user should choose from.
100 // Returns true if the prompt is indeed displayed. If the prompt is not 111 // Returns true if the prompt is indeed displayed. If the prompt is not
101 // displayed, returns false and does not call |callback|. 112 // displayed, returns false and does not call |callback|.
102 // |callback| should be invoked with the chosen form. 113 // |callback| should be invoked with the chosen form.
103 virtual bool PromptUserToChooseCredentials( 114 virtual bool PromptUserToChooseCredentials(
104 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, 115 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms,
105 const GURL& origin, 116 const GURL& origin,
106 const CredentialsCallback& callback) = 0; 117 const CredentialsCallback& callback) = 0;
107 118
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // hold on to the pointer. 245 // hold on to the pointer.
235 virtual PasswordManagerMetricsRecorder& GetMetricsRecorder() = 0; 246 virtual PasswordManagerMetricsRecorder& GetMetricsRecorder() = 0;
236 247
237 private: 248 private:
238 DISALLOW_COPY_AND_ASSIGN(PasswordManagerClient); 249 DISALLOW_COPY_AND_ASSIGN(PasswordManagerClient);
239 }; 250 };
240 251
241 } // namespace password_manager 252 } // namespace password_manager
242 253
243 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ 254 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698