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

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: 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 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 has_generated_password,
47 bool is_update) = 0;
48
49 // Called when the user cleared the password field. This switches the icon
50 // back to manage or inactive state.
51 virtual void OnHideManualFallbackForSaving() = 0;
52
41 // Called when the site asks user to choose from credentials. This triggers 53 // 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| 54 // the UI to prompt the user. |local_credentials| shouldn't be empty. |origin|
43 // is a URL of the site that requested a credential. 55 // 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 56 // 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 57 // a decision. If the UI isn't shown the method returns false and doesn't call
46 // |callback|. 58 // |callback|.
47 virtual bool OnChooseCredentials( 59 virtual bool OnChooseCredentials(
48 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials, 60 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials,
49 const GURL& origin, 61 const GURL& origin,
50 const base::Callback<void(const autofill::PasswordForm*)>& callback) = 0; 62 const base::Callback<void(const autofill::PasswordForm*)>& callback) = 0;
(...skipping 25 matching lines...) Expand all
76 88
77 protected: 89 protected:
78 virtual ~PasswordsClientUIDelegate() = default; 90 virtual ~PasswordsClientUIDelegate() = default;
79 }; 91 };
80 92
81 // Returns ManagePasswordsUIController instance for |contents| 93 // Returns ManagePasswordsUIController instance for |contents|
82 PasswordsClientUIDelegate* PasswordsClientUIDelegateFromWebContents( 94 PasswordsClientUIDelegate* PasswordsClientUIDelegateFromWebContents(
83 content::WebContents* web_contents); 95 content::WebContents* web_contents);
84 96
85 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_CLIENT_UI_DELEGATE_H_ 97 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_CLIENT_UI_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698