OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 const GURL& origin, | 58 const GURL& origin, |
59 const ManagePasswordsState::CredentialsCallback& callback) override; | 59 const ManagePasswordsState::CredentialsCallback& callback) override; |
60 void OnAutoSignin( | 60 void OnAutoSignin( |
61 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, | 61 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, |
62 const GURL& origin) override; | 62 const GURL& origin) override; |
63 void OnPromptEnableAutoSignin() override; | 63 void OnPromptEnableAutoSignin() override; |
64 void OnAutomaticPasswordSave( | 64 void OnAutomaticPasswordSave( |
65 std::unique_ptr<password_manager::PasswordFormManager> form_manager) | 65 std::unique_ptr<password_manager::PasswordFormManager> form_manager) |
66 override; | 66 override; |
67 void OnPasswordAutofilled( | 67 void OnPasswordAutofilled( |
68 const autofill::PasswordFormMap& password_form_map, | 68 const std::map<base::string16, const autofill::PasswordForm*>& |
| 69 password_form_map, |
69 const GURL& origin, | 70 const GURL& origin, |
70 const std::vector<std::unique_ptr<autofill::PasswordForm>>* | 71 const std::vector<const autofill::PasswordForm*>* federated_matches) |
71 federated_matches) override; | 72 override; |
72 | 73 |
73 // PasswordStore::Observer: | 74 // PasswordStore::Observer: |
74 void OnLoginsChanged( | 75 void OnLoginsChanged( |
75 const password_manager::PasswordStoreChangeList& changes) override; | 76 const password_manager::PasswordStoreChangeList& changes) override; |
76 | 77 |
77 // Set the state of the Omnibox icon, and possibly show the associated bubble | 78 // Set the state of the Omnibox icon, and possibly show the associated bubble |
78 // without user interaction. | 79 // without user interaction. |
79 virtual void UpdateIconAndBubbleState(ManagePasswordsIconView* icon); | 80 virtual void UpdateIconAndBubbleState(ManagePasswordsIconView* icon); |
80 | 81 |
81 bool IsAutomaticallyOpeningBubble() const { | 82 bool IsAutomaticallyOpeningBubble() const { |
82 return bubble_status_ == SHOULD_POP_UP; | 83 return bubble_status_ == SHOULD_POP_UP; |
83 } | 84 } |
84 | 85 |
85 base::WeakPtr<PasswordsModelDelegate> GetModelDelegateProxy(); | 86 base::WeakPtr<PasswordsModelDelegate> GetModelDelegateProxy(); |
86 | 87 |
87 // PasswordsModelDelegate: | 88 // PasswordsModelDelegate: |
88 content::WebContents* GetWebContents() const override; | 89 content::WebContents* GetWebContents() const override; |
89 const GURL& GetOrigin() const override; | 90 const GURL& GetOrigin() const override; |
90 password_manager::ui::State GetState() const override; | 91 password_manager::ui::State GetState() const override; |
91 const autofill::PasswordForm& GetPendingPassword() const override; | 92 const autofill::PasswordForm& GetPendingPassword() const override; |
92 bool IsPasswordOverridden() const override; | 93 bool IsPasswordOverridden() const override; |
93 const std::vector<std::unique_ptr<autofill::PasswordForm>>& GetCurrentForms() | 94 const std::vector<std::unique_ptr<autofill::PasswordForm>>& GetCurrentForms() |
94 const override; | 95 const override; |
95 const std::vector<std::unique_ptr<autofill::PasswordForm>>& | 96 const std::vector<std::unique_ptr<autofill::PasswordForm>>& |
96 GetFederatedForms() const override; | 97 GetFederatedForms() const override; |
97 password_manager::InteractionsStats* GetCurrentInteractionStats() const | 98 const password_manager::InteractionsStats* GetCurrentInteractionStats() |
98 override; | 99 const override; |
99 void OnBubbleShown() override; | 100 void OnBubbleShown() override; |
100 void OnBubbleHidden() override; | 101 void OnBubbleHidden() override; |
101 void OnNoInteractionOnUpdate() override; | 102 void OnNoInteractionOnUpdate() override; |
102 void OnNopeUpdateClicked() override; | 103 void OnNopeUpdateClicked() override; |
103 void NeverSavePassword() override; | 104 void NeverSavePassword() override; |
104 void SavePassword() override; | 105 void SavePassword() override; |
105 void UpdatePassword(const autofill::PasswordForm& password_form) override; | 106 void UpdatePassword(const autofill::PasswordForm& password_form) override; |
106 void ChooseCredential( | 107 void ChooseCredential( |
107 const autofill::PasswordForm& form, | 108 const autofill::PasswordForm& form, |
108 password_manager::CredentialType credential_type) override; | 109 password_manager::CredentialType credential_type) override; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // Thus, OnBubbleHidden() can be called after the new one is shown. By that | 187 // Thus, OnBubbleHidden() can be called after the new one is shown. By that |
187 // time the internal state of ManagePasswordsUIController has nothing to do | 188 // time the internal state of ManagePasswordsUIController has nothing to do |
188 // with the old bubble. | 189 // with the old bubble. |
189 // Invalidating all the weak pointers will detach the current bubble. | 190 // Invalidating all the weak pointers will detach the current bubble. |
190 base::WeakPtrFactory<ManagePasswordsUIController> weak_ptr_factory_; | 191 base::WeakPtrFactory<ManagePasswordsUIController> weak_ptr_factory_; |
191 | 192 |
192 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); | 193 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); |
193 }; | 194 }; |
194 | 195 |
195 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 196 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
OLD | NEW |