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 "chrome/browser/ui/passwords/manage_passwords_bubble.h" | 8 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" |
9 #include "components/autofill/core/common/password_form.h" | 9 #include "components/autofill/core/common/password_form.h" |
10 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" | 10 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // Called by the view code when the bubble is hidden. | 42 // Called by the view code when the bubble is hidden. |
43 void OnBubbleHidden(); | 43 void OnBubbleHidden(); |
44 | 44 |
45 // Called by the view code when the "Nope" button in clicked by the user. | 45 // Called by the view code when the "Nope" button in clicked by the user. |
46 void OnNopeClicked(); | 46 void OnNopeClicked(); |
47 | 47 |
48 // Called by the view code when the "Never for this site." button in clicked | 48 // Called by the view code when the "Never for this site." button in clicked |
49 // by the user. | 49 // by the user. |
50 void OnNeverForThisSiteClicked(); | 50 void OnNeverForThisSiteClicked(); |
51 | 51 |
| 52 // Called by the view code when the site is unblacklisted. |
| 53 void OnUnblacklistClicked(); |
| 54 |
52 // Called by the view code when the save button in clicked by the user. | 55 // Called by the view code when the save button in clicked by the user. |
53 void OnSaveClicked(); | 56 void OnSaveClicked(); |
54 | 57 |
55 // Called by the view code when the "Done" button is clicked by the user. | 58 // Called by the view code when the "Done" button is clicked by the user. |
56 void OnDoneClicked(); | 59 void OnDoneClicked(); |
57 | 60 |
58 // Called by the view code when the manage link is clicked by the user. | 61 // Called by the view code when the manage link is clicked by the user. |
59 void OnManageLinkClicked(); | 62 void OnManageLinkClicked(); |
60 | 63 |
61 // Called by the view code to delete or add a password form to the | 64 // Called by the view code to delete or add a password form to the |
62 // PasswordStore. | 65 // PasswordStore. |
63 void OnPasswordAction(const autofill::PasswordForm& password_form, | 66 void OnPasswordAction(const autofill::PasswordForm& password_form, |
64 PasswordAction action); | 67 PasswordAction action); |
65 | 68 |
66 // Called by the view code when the bubble is closed without ever displaying | 69 // Called by the view code when the bubble is closed without ever displaying |
67 // content to the user. We shouldn't log to UMA in this case. | 70 // content to the user. We shouldn't log to UMA in this case. |
68 void OnCloseWithoutLogging(); | 71 void OnCloseWithoutLogging(); |
69 | 72 |
70 ManagePasswordsBubbleState manage_passwords_bubble_state() const { | 73 ManagePasswordsBubbleState manage_passwords_bubble_state() const { |
71 return manage_passwords_bubble_state_; | 74 return manage_passwords_bubble_state_; |
72 } | 75 } |
73 | 76 |
74 bool WaitingToSavePassword() const { | 77 bool WaitingToSavePassword() const { |
75 return manage_passwords_bubble_state() == PASSWORD_TO_BE_SAVED; | 78 return manage_passwords_bubble_state_ == PASSWORD_TO_BE_SAVED; |
| 79 } |
| 80 |
| 81 bool NeverSavingPasswords() const { |
| 82 return manage_passwords_bubble_state_ == NEVER_SAVE_PASSWORDS; |
76 } | 83 } |
77 | 84 |
78 const base::string16& title() const { return title_; } | 85 const base::string16& title() const { return title_; } |
79 const autofill::PasswordForm& pending_credentials() const { | 86 const autofill::PasswordForm& pending_credentials() const { |
80 return pending_credentials_; | 87 return pending_credentials_; |
81 } | 88 } |
82 const autofill::PasswordFormMap& best_matches() const { | 89 const autofill::PasswordFormMap& best_matches() const { |
83 return best_matches_; | 90 return best_matches_; |
84 } | 91 } |
85 const base::string16& manage_link() const { return manage_link_; } | 92 const base::string16& manage_link() const { return manage_link_; } |
(...skipping 26 matching lines...) Expand all Loading... |
112 autofill::PasswordFormMap best_matches_; | 119 autofill::PasswordFormMap best_matches_; |
113 base::string16 manage_link_; | 120 base::string16 manage_link_; |
114 | 121 |
115 password_manager::metrics_util::UIDisplayDisposition display_disposition_; | 122 password_manager::metrics_util::UIDisplayDisposition display_disposition_; |
116 password_manager::metrics_util::UIDismissalReason dismissal_reason_; | 123 password_manager::metrics_util::UIDismissalReason dismissal_reason_; |
117 | 124 |
118 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); | 125 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); |
119 }; | 126 }; |
120 | 127 |
121 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 128 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
OLD | NEW |