| 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_PASSWORD_DIALOG_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_PASSWORD_DIALOG_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_DIALOG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_DIALOG_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 virtual const FormsVector& GetLocalForms() const = 0; | 27 virtual const FormsVector& GetLocalForms() const = 0; |
| 28 | 28 |
| 29 // Returns IDP's forms which can be used for logging in. | 29 // Returns IDP's forms which can be used for logging in. |
| 30 virtual const FormsVector& GetFederationsForms() const = 0; | 30 virtual const FormsVector& GetFederationsForms() const = 0; |
| 31 | 31 |
| 32 // Returns a title of the account chooser and a range of the Smart Lock | 32 // Returns a title of the account chooser and a range of the Smart Lock |
| 33 // hyperlink if it exists. If the range is empty then no hyperlink is shown. | 33 // hyperlink if it exists. If the range is empty then no hyperlink is shown. |
| 34 virtual std::pair<base::string16, gfx::Range> GetAccoutChooserTitle() const | 34 virtual std::pair<base::string16, gfx::Range> GetAccoutChooserTitle() const |
| 35 = 0; | 35 = 0; |
| 36 | 36 |
| 37 // Whether the account chooser should display the "Sign in" button. |
| 38 virtual bool ShouldShowSignInButton() const = 0; |
| 39 |
| 37 // Returns the title for the autosignin first run dialog. | 40 // Returns the title for the autosignin first run dialog. |
| 38 virtual base::string16 GetAutoSigninPromoTitle() const = 0; | 41 virtual base::string16 GetAutoSigninPromoTitle() const = 0; |
| 39 | 42 |
| 40 // Returns a text of the auto signin first run promo and a range of the Smart | 43 // Returns a text of the auto signin first run promo and a range of the Smart |
| 41 // Lock hyperlink if it exists. The empty range means no hyperlink is shown. | 44 // Lock hyperlink if it exists. The empty range means no hyperlink is shown. |
| 42 virtual std::pair<base::string16, gfx::Range> GetAutoSigninText() const = 0; | 45 virtual std::pair<base::string16, gfx::Range> GetAutoSigninText() const = 0; |
| 43 | 46 |
| 44 // Called when the Smart Lock hyperlink is clicked. | 47 // Called when the Smart Lock hyperlink is clicked. |
| 45 virtual void OnSmartLockLinkClicked() = 0; | 48 virtual void OnSmartLockLinkClicked() = 0; |
| 46 | 49 |
| 47 // Called when the user chooses a credential. | 50 // Called when the user chooses a credential. |
| 48 virtual void OnChooseCredentials( | 51 virtual void OnChooseCredentials( |
| 49 const autofill::PasswordForm& password_form, | 52 const autofill::PasswordForm& password_form, |
| 50 password_manager::CredentialType credential_type) = 0; | 53 password_manager::CredentialType credential_type) = 0; |
| 51 | 54 |
| 55 // Called when the user clicks "Sign in" in the account chooser. |
| 56 virtual void OnSignInClicked() = 0; |
| 57 |
| 52 // Called when user clicks OK in the auto signin first run promo. | 58 // Called when user clicks OK in the auto signin first run promo. |
| 53 virtual void OnAutoSigninOK() = 0; | 59 virtual void OnAutoSigninOK() = 0; |
| 54 | 60 |
| 55 // Called when user disables the auto signin setting. | 61 // Called when user disables the auto signin setting. |
| 56 virtual void OnAutoSigninTurnOff() = 0; | 62 virtual void OnAutoSigninTurnOff() = 0; |
| 57 | 63 |
| 58 // Called when the dialog was closed. | 64 // Called when the dialog was closed. |
| 59 virtual void OnCloseDialog() = 0; | 65 virtual void OnCloseDialog() = 0; |
| 60 | 66 |
| 61 protected: | 67 protected: |
| 62 virtual ~PasswordDialogController() = default; | 68 virtual ~PasswordDialogController() = default; |
| 63 }; | 69 }; |
| 64 | 70 |
| 65 | 71 |
| 66 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_DIALOG_CONTROLLER_H_ | 72 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_DIALOG_CONTROLLER_H_ |
| OLD | NEW |