| 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_MODEL_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_MODEL_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_MODEL_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_MODEL_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // Returns the pending password in PENDING_PASSWORD_STATE and | 39 // Returns the pending password in PENDING_PASSWORD_STATE and |
| 40 // PENDING_PASSWORD_UPDATE_STATE, the saved password in CONFIRMATION_STATE, | 40 // PENDING_PASSWORD_UPDATE_STATE, the saved password in CONFIRMATION_STATE, |
| 41 // the returned credential in AUTO_SIGNIN_STATE. | 41 // the returned credential in AUTO_SIGNIN_STATE. |
| 42 virtual const autofill::PasswordForm& GetPendingPassword() const = 0; | 42 virtual const autofill::PasswordForm& GetPendingPassword() const = 0; |
| 43 | 43 |
| 44 // True if the password for previously stored account was overridden, i.e. in | 44 // True if the password for previously stored account was overridden, i.e. in |
| 45 // newly submitted form the password is different from stored one. | 45 // newly submitted form the password is different from stored one. |
| 46 virtual bool IsPasswordOverridden() const = 0; | 46 virtual bool IsPasswordOverridden() const = 0; |
| 47 | 47 |
| 48 // Returns current local forms for the current page. | 48 // Returns current local forms for the current page. |
| 49 virtual const std::vector<const autofill::PasswordForm*>& | 49 virtual const std::vector<std::unique_ptr<autofill::PasswordForm>>& |
| 50 GetCurrentForms() const = 0; | 50 GetCurrentForms() const = 0; |
| 51 | 51 |
| 52 // Returns possible identity provider's credentials for the current site. | 52 // Returns possible identity provider's credentials for the current site. |
| 53 virtual const std::vector<const autofill::PasswordForm*>& | 53 virtual const std::vector<std::unique_ptr<autofill::PasswordForm>>& |
| 54 GetFederatedForms() const = 0; | 54 GetFederatedForms() const = 0; |
| 55 | 55 |
| 56 // For PENDING_PASSWORD_STATE state returns the current statistics for | 56 // For PENDING_PASSWORD_STATE state returns the current statistics for |
| 57 // the pending username. | 57 // the pending username. |
| 58 virtual password_manager::InteractionsStats* GetCurrentInteractionStats() | 58 virtual password_manager::InteractionsStats* GetCurrentInteractionStats() |
| 59 const = 0; | 59 const = 0; |
| 60 | 60 |
| 61 // Called from the model when the bubble is displayed. | 61 // Called from the model when the bubble is displayed. |
| 62 virtual void OnBubbleShown() = 0; | 62 virtual void OnBubbleShown() = 0; |
| 63 | 63 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 virtual void OnDialogHidden() = 0; | 98 virtual void OnDialogHidden() = 0; |
| 99 | 99 |
| 100 protected: | 100 protected: |
| 101 virtual ~PasswordsModelDelegate() = default; | 101 virtual ~PasswordsModelDelegate() = default; |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 base::WeakPtr<PasswordsModelDelegate> | 104 base::WeakPtr<PasswordsModelDelegate> |
| 105 PasswordsModelDelegateFromWebContents(content::WebContents* web_contents); | 105 PasswordsModelDelegateFromWebContents(content::WebContents* web_contents); |
| 106 | 106 |
| 107 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_MODEL_DELEGATE_H_ | 107 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_MODEL_DELEGATE_H_ |
| OLD | NEW |