| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BUBBLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" | 9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" |
| 10 #include "components/autofill/core/common/password_form.h" | 10 #include "components/autofill/core/common/password_form.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // by the user. | 56 // by the user. |
| 57 void OnNeverForThisSiteClicked(); | 57 void OnNeverForThisSiteClicked(); |
| 58 | 58 |
| 59 // Called by the view code when the "Undo" button is clicked in | 59 // Called by the view code when the "Undo" button is clicked in |
| 60 // "Never for this site." confirmation bubble by the user. | 60 // "Never for this site." confirmation bubble by the user. |
| 61 void OnUndoNeverForThisSite(); | 61 void OnUndoNeverForThisSite(); |
| 62 | 62 |
| 63 // Called by the view code when the site is unblacklisted. | 63 // Called by the view code when the site is unblacklisted. |
| 64 void OnUnblacklistClicked(); | 64 void OnUnblacklistClicked(); |
| 65 | 65 |
| 66 // Called by the view code when the save button in clicked by the user. | 66 // Called by the view code when the save button is clicked by the user. |
| 67 void OnSaveClicked(); | 67 void OnSaveClicked(); |
| 68 | 68 |
| 69 // Called by the view code when the update link is clicked by the user. |
| 70 void OnUpdateClicked(const autofill::PasswordForm& password_form); |
| 71 |
| 69 // Called by the view code when the "Done" button is clicked by the user. | 72 // Called by the view code when the "Done" button is clicked by the user. |
| 70 void OnDoneClicked(); | 73 void OnDoneClicked(); |
| 71 | 74 |
| 72 // Called by the view code when the "OK" button is clicked by the user. | 75 // Called by the view code when the "OK" button is clicked by the user. |
| 73 void OnOKClicked(); | 76 void OnOKClicked(); |
| 74 | 77 |
| 75 // Called by the view code when the manage link is clicked by the user. | 78 // Called by the view code when the manage link is clicked by the user. |
| 76 void OnManageLinkClicked(); | 79 void OnManageLinkClicked(); |
| 77 | 80 |
| 78 // Called by the view code when the brand name link is clicked by the user. | 81 // Called by the view code when the brand name link is clicked by the user. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 const gfx::Range& title_brand_link_range() const { | 128 const gfx::Range& title_brand_link_range() const { |
| 126 return title_brand_link_range_; | 129 return title_brand_link_range_; |
| 127 } | 130 } |
| 128 | 131 |
| 129 Profile* GetProfile() const; | 132 Profile* GetProfile() const; |
| 130 | 133 |
| 131 // Returns true iff the new UI should be presented to user for managing and | 134 // Returns true iff the new UI should be presented to user for managing and |
| 132 // saving the passwords. | 135 // saving the passwords. |
| 133 bool IsNewUIActive() const; | 136 bool IsNewUIActive() const; |
| 134 | 137 |
| 138 // Returns true iff the multiple account selection prompt for account update |
| 139 // should be presented. |
| 140 bool ShouldShowMultipleAccountUpdateUI() const; |
| 141 |
| 135 #if defined(UNIT_TEST) | 142 #if defined(UNIT_TEST) |
| 136 // Gets and sets the reason the bubble was displayed. | 143 // Gets and sets the reason the bubble was displayed. |
| 137 password_manager::metrics_util::UIDisplayDisposition display_disposition() | 144 password_manager::metrics_util::UIDisplayDisposition display_disposition() |
| 138 const { | 145 const { |
| 139 return display_disposition_; | 146 return display_disposition_; |
| 140 } | 147 } |
| 141 | 148 |
| 142 // Gets the reason the bubble was dismissed. | 149 // Gets the reason the bubble was dismissed. |
| 143 password_manager::metrics_util::UIDismissalReason dismissal_reason() const { | 150 password_manager::metrics_util::UIDismissalReason dismissal_reason() const { |
| 144 return dismissal_reason_; | 151 return dismissal_reason_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 172 // If true upon destruction, the user has confirmed that she never wants to | 179 // If true upon destruction, the user has confirmed that she never wants to |
| 173 // save passwords for a particular site. | 180 // save passwords for a particular site. |
| 174 bool never_save_passwords_; | 181 bool never_save_passwords_; |
| 175 password_manager::metrics_util::UIDisplayDisposition display_disposition_; | 182 password_manager::metrics_util::UIDisplayDisposition display_disposition_; |
| 176 password_manager::metrics_util::UIDismissalReason dismissal_reason_; | 183 password_manager::metrics_util::UIDismissalReason dismissal_reason_; |
| 177 | 184 |
| 178 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); | 185 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); |
| 179 }; | 186 }; |
| 180 | 187 |
| 181 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 188 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
| OLD | NEW |