| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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<std::unique_ptr<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. | |
| 53 virtual const std::vector<std::unique_ptr<autofill::PasswordForm>>& | |
| 54 GetFederatedForms() const = 0; | |
| 55 | |
| 56 // For PENDING_PASSWORD_STATE state returns the current statistics for | 52 // For PENDING_PASSWORD_STATE state returns the current statistics for |
| 57 // the pending username. | 53 // the pending username. |
| 58 virtual const password_manager::InteractionsStats* | 54 virtual const password_manager::InteractionsStats* |
| 59 GetCurrentInteractionStats() const = 0; | 55 GetCurrentInteractionStats() const = 0; |
| 60 | 56 |
| 61 // Called from the model when the bubble is displayed. | 57 // Called from the model when the bubble is displayed. |
| 62 virtual void OnBubbleShown() = 0; | 58 virtual void OnBubbleShown() = 0; |
| 63 | 59 |
| 64 // Called from the model when the bubble is hidden. | 60 // Called from the model when the bubble is hidden. |
| 65 virtual void OnBubbleHidden() = 0; | 61 virtual void OnBubbleHidden() = 0; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 virtual void OnDialogHidden() = 0; | 94 virtual void OnDialogHidden() = 0; |
| 99 | 95 |
| 100 protected: | 96 protected: |
| 101 virtual ~PasswordsModelDelegate() = default; | 97 virtual ~PasswordsModelDelegate() = default; |
| 102 }; | 98 }; |
| 103 | 99 |
| 104 base::WeakPtr<PasswordsModelDelegate> | 100 base::WeakPtr<PasswordsModelDelegate> |
| 105 PasswordsModelDelegateFromWebContents(content::WebContents* web_contents); | 101 PasswordsModelDelegateFromWebContents(content::WebContents* web_contents); |
| 106 | 102 |
| 107 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_MODEL_DELEGATE_H_ | 103 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_MODEL_DELEGATE_H_ |
| OLD | NEW |