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 "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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 // Gets the reason the bubble was dismissed. | 135 // Gets the reason the bubble was dismissed. |
136 password_manager::metrics_util::UIDismissalReason dismissal_reason() const { | 136 password_manager::metrics_util::UIDismissalReason dismissal_reason() const { |
137 return dismissal_reason_; | 137 return dismissal_reason_; |
138 } | 138 } |
139 | 139 |
140 // State setter. | 140 // State setter. |
141 void set_state(password_manager::ui::State state) { state_ = state; } | 141 void set_state(password_manager::ui::State state) { state_ = state; } |
142 #endif | 142 #endif |
143 | 143 |
144 // Upper limits on the size of the username and password fields. | |
145 static int UsernameFieldWidth(); | |
146 static int PasswordFieldWidth(); | |
147 | |
148 private: | 144 private: |
149 enum UserBehaviorOnUpdateBubble { | 145 enum UserBehaviorOnUpdateBubble { |
150 UPDATE_CLICKED, | 146 UPDATE_CLICKED, |
151 NOPE_CLICKED, | 147 NOPE_CLICKED, |
152 NO_INTERACTION | 148 NO_INTERACTION |
153 }; | 149 }; |
154 // Updates |title_| and |title_brand_link_range_| for the | 150 // Updates |title_| and |title_brand_link_range_| for the |
155 // PENDING_PASSWORD_STATE. | 151 // PENDING_PASSWORD_STATE. |
156 void UpdatePendingStateTitle(); | 152 void UpdatePendingStateTitle(); |
157 // Updates |title_| for the MANAGE_STATE. | 153 // Updates |title_| for the MANAGE_STATE. |
(...skipping 16 matching lines...) Expand all Loading... |
174 gfx::Range save_confirmation_link_range_; | 170 gfx::Range save_confirmation_link_range_; |
175 password_manager::metrics_util::UIDisplayDisposition display_disposition_; | 171 password_manager::metrics_util::UIDisplayDisposition display_disposition_; |
176 password_manager::metrics_util::UIDismissalReason dismissal_reason_; | 172 password_manager::metrics_util::UIDismissalReason dismissal_reason_; |
177 password_manager::metrics_util::UpdatePasswordSubmissionEvent | 173 password_manager::metrics_util::UpdatePasswordSubmissionEvent |
178 update_password_submission_event_; | 174 update_password_submission_event_; |
179 | 175 |
180 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); | 176 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); |
181 }; | 177 }; |
182 | 178 |
183 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 179 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
OLD | NEW |