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

Side by Side Diff: chrome/browser/ui/passwords/passwords_client_ui_delegate.h

Issue 2915763003: [Password Manager] Show omnibox icon and anchored prompt once user start typing password (Closed)
Patch Set: Changes addressed to vasilii@ comments 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_CLIENT_UI_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_CLIENT_UI_DELEGATE_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_CLIENT_UI_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_CLIENT_UI_DELEGATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 20 matching lines...) Expand all
31 // about whether they would like to save the password. 31 // about whether they would like to save the password.
32 virtual void OnPasswordSubmitted( 32 virtual void OnPasswordSubmitted(
33 std::unique_ptr<password_manager::PasswordFormManager> form_manager) = 0; 33 std::unique_ptr<password_manager::PasswordFormManager> form_manager) = 0;
34 34
35 // Called when the user submits a new password for an existing credential. 35 // Called when the user submits a new password for an existing credential.
36 // This stores the provided object and triggers the UI to prompt the user 36 // This stores the provided object and triggers the UI to prompt the user
37 // about whether they would like to update the password. 37 // about whether they would like to update the password.
38 virtual void OnUpdatePasswordSubmitted( 38 virtual void OnUpdatePasswordSubmitted(
39 std::unique_ptr<password_manager::PasswordFormManager> form_manager) = 0; 39 std::unique_ptr<password_manager::PasswordFormManager> form_manager) = 0;
40 40
41 // Called when the user starts typing in a password field. This switches the
42 // icon to a pending state, a user can click on the icon and open a
43 // save/update bubble.
44 virtual void OnShowManualFallbackForSaving(
45 std::unique_ptr<password_manager::PasswordFormManager> form_manager,
46 bool is_update) = 0;
47
48 // Called when the user cleared the password field. This switches the icon
49 // back to manage or inactive state.
50 virtual void OnHideManualFallbackForSaving() = 0;
51
41 // Called when the site asks user to choose from credentials. This triggers 52 // Called when the site asks user to choose from credentials. This triggers
42 // the UI to prompt the user. |local_credentials| shouldn't be empty. |origin| 53 // the UI to prompt the user. |local_credentials| shouldn't be empty. |origin|
43 // is a URL of the site that requested a credential. 54 // is a URL of the site that requested a credential.
44 // Returns true when the UI is shown. |callback| is called when the user made 55 // Returns true when the UI is shown. |callback| is called when the user made
45 // a decision. If the UI isn't shown the method returns false and doesn't call 56 // a decision. If the UI isn't shown the method returns false and doesn't call
46 // |callback|. 57 // |callback|.
47 virtual bool OnChooseCredentials( 58 virtual bool OnChooseCredentials(
48 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials, 59 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials,
49 const GURL& origin, 60 const GURL& origin,
50 const base::Callback<void(const autofill::PasswordForm*)>& callback) = 0; 61 const base::Callback<void(const autofill::PasswordForm*)>& callback) = 0;
(...skipping 25 matching lines...) Expand all
76 87
77 protected: 88 protected:
78 virtual ~PasswordsClientUIDelegate() = default; 89 virtual ~PasswordsClientUIDelegate() = default;
79 }; 90 };
80 91
81 // Returns ManagePasswordsUIController instance for |contents| 92 // Returns ManagePasswordsUIController instance for |contents|
82 PasswordsClientUIDelegate* PasswordsClientUIDelegateFromWebContents( 93 PasswordsClientUIDelegate* PasswordsClientUIDelegateFromWebContents(
83 content::WebContents* web_contents); 94 content::WebContents* web_contents);
84 95
85 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_CLIENT_UI_DELEGATE_H_ 96 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_CLIENT_UI_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698