Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 creates a | |
| 42 // save/update prompt anchored to the omnibox icon but keeps it hidden. | |
|
vasilii
2017/07/21 12:48:20
It doesn't create any prompt. Only the icon.
kolos1
2017/07/24 15:33:30
Done.
| |
| 43 virtual void OnShowManualFallback( | |
|
vasilii
2017/07/21 12:48:20
ForSaving
kolos1
2017/07/24 15:33:30
Done.
| |
| 44 std::unique_ptr<password_manager::PasswordFormManager> form_manager, | |
| 45 bool is_update) = 0; | |
| 46 | |
| 47 // Called when the user cleared the password field. This removes the hidden | |
| 48 // save/update prompt and switch UI to |MANAGE_STATE|. | |
|
vasilii
2017/07/21 12:48:20
There is no a hidden prompt at any point in time.
kolos1
2017/07/24 15:33:30
Done.
| |
| 49 virtual void OnHideManualFallback() = 0; | |
| 50 | |
| 41 // Called when the site asks user to choose from credentials. This triggers | 51 // 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| | 52 // the UI to prompt the user. |local_credentials| shouldn't be empty. |origin| |
| 43 // is a URL of the site that requested a credential. | 53 // 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 | 54 // 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 | 55 // a decision. If the UI isn't shown the method returns false and doesn't call |
| 46 // |callback|. | 56 // |callback|. |
| 47 virtual bool OnChooseCredentials( | 57 virtual bool OnChooseCredentials( |
| 48 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials, | 58 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials, |
| 49 const GURL& origin, | 59 const GURL& origin, |
| 50 const base::Callback<void(const autofill::PasswordForm*)>& callback) = 0; | 60 const base::Callback<void(const autofill::PasswordForm*)>& callback) = 0; |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 76 | 86 |
| 77 protected: | 87 protected: |
| 78 virtual ~PasswordsClientUIDelegate() = default; | 88 virtual ~PasswordsClientUIDelegate() = default; |
| 79 }; | 89 }; |
| 80 | 90 |
| 81 // Returns ManagePasswordsUIController instance for |contents| | 91 // Returns ManagePasswordsUIController instance for |contents| |
| 82 PasswordsClientUIDelegate* PasswordsClientUIDelegateFromWebContents( | 92 PasswordsClientUIDelegate* PasswordsClientUIDelegateFromWebContents( |
| 83 content::WebContents* web_contents); | 93 content::WebContents* web_contents); |
| 84 | 94 |
| 85 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_CLIENT_UI_DELEGATE_H_ | 95 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_CLIENT_UI_DELEGATE_H_ |
| OLD | NEW |