Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model.h

Issue 266973002: Password bubble: Create subviews for ManagePasswordsBubbleView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // Called by the view code to delete or add a password form to the 61 // Called by the view code to delete or add a password form to the
62 // PasswordStore. 62 // PasswordStore.
63 void OnPasswordAction(const autofill::PasswordForm& password_form, 63 void OnPasswordAction(const autofill::PasswordForm& password_form,
64 PasswordAction action); 64 PasswordAction action);
65 65
66 // Called by the view code when the bubble is closed without ever displaying 66 // 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. 67 // content to the user. We shouldn't log to UMA in this case.
68 void OnCloseWithoutLogging(); 68 void OnCloseWithoutLogging();
69 69
70 ManagePasswordsBubbleState manage_passwords_bubble_state() { 70 ManagePasswordsBubbleState manage_passwords_bubble_state() const {
71 return manage_passwords_bubble_state_; 71 return manage_passwords_bubble_state_;
72 } 72 }
73 73
74 bool WaitingToSavePassword() { 74 bool WaitingToSavePassword() const {
75 return manage_passwords_bubble_state() == PASSWORD_TO_BE_SAVED; 75 return manage_passwords_bubble_state() == PASSWORD_TO_BE_SAVED;
76 } 76 }
77 77
78 const base::string16& title() { return title_; } 78 const base::string16& title() const { return title_; }
79 const autofill::PasswordForm& pending_credentials() { 79 const autofill::PasswordForm& pending_credentials() const {
80 return pending_credentials_; 80 return pending_credentials_;
81 } 81 }
82 const autofill::PasswordFormMap& best_matches() { return best_matches_; } 82 const autofill::PasswordFormMap& best_matches() const {
83 const base::string16& manage_link() { return manage_link_; } 83 return best_matches_;
84 }
85 const base::string16& manage_link() const { return manage_link_; }
84 86
85 // Gets and sets the reason the bubble was displayed; exposed for testing. 87 // Gets and sets the reason the bubble was displayed; exposed for testing.
86 password_manager::metrics_util::UIDisplayDisposition display_disposition() 88 password_manager::metrics_util::UIDisplayDisposition display_disposition()
87 const { 89 const {
88 return display_disposition_; 90 return display_disposition_;
89 } 91 }
90 92
91 // Gets the reason the bubble was dismissed; exposed for testing. 93 // Gets the reason the bubble was dismissed; exposed for testing.
92 password_manager::metrics_util::UIDismissalReason dismissal_reason() const { 94 password_manager::metrics_util::UIDismissalReason dismissal_reason() const {
93 return dismissal_reason_; 95 return dismissal_reason_;
(...skipping 16 matching lines...) Expand all
110 autofill::PasswordFormMap best_matches_; 112 autofill::PasswordFormMap best_matches_;
111 base::string16 manage_link_; 113 base::string16 manage_link_;
112 114
113 password_manager::metrics_util::UIDisplayDisposition display_disposition_; 115 password_manager::metrics_util::UIDisplayDisposition display_disposition_;
114 password_manager::metrics_util::UIDismissalReason dismissal_reason_; 116 password_manager::metrics_util::UIDismissalReason dismissal_reason_;
115 117
116 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); 118 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel);
117 }; 119 };
118 120
119 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ 121 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_bubble.h ('k') | chrome/browser/ui/passwords/manage_passwords_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698