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

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

Issue 228593002: Password bubble: Keep the bubble in sync with the password store. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 "components/autofill/core/common/password_form.h" 8 #include "components/autofill/core/common/password_form.h"
9 #include "content/public/browser/web_contents_observer.h" 9 #include "content/public/browser/web_contents_observer.h"
10 10
(...skipping 30 matching lines...) Expand all
41 void OnSaveClicked(); 41 void OnSaveClicked();
42 42
43 // Called by the view code when the manage link is clicked by the user. 43 // Called by the view code when the manage link is clicked by the user.
44 void OnManageLinkClicked(); 44 void OnManageLinkClicked();
45 45
46 // Called by the view code to delete or add a password form to the 46 // Called by the view code to delete or add a password form to the
47 // PasswordStore. 47 // PasswordStore.
48 void OnPasswordAction(const autofill::PasswordForm& password_form, 48 void OnPasswordAction(const autofill::PasswordForm& password_form,
49 PasswordAction action); 49 PasswordAction action);
50 50
51 // Called by the view code when the ManagePasswordItemView is destroyed and
52 // the user chose to delete the password.
53 // TODO(npentrel): Remove this once best_matches_ are newly made on bubble
54 // opening.
55 void DeleteFromBestMatches(autofill::PasswordForm password_form);
56
57 ManagePasswordsBubbleState manage_passwords_bubble_state() { 51 ManagePasswordsBubbleState manage_passwords_bubble_state() {
58 return manage_passwords_bubble_state_; 52 return manage_passwords_bubble_state_;
59 } 53 }
60 54
61 bool WaitingToSavePassword() { 55 bool WaitingToSavePassword() {
62 return manage_passwords_bubble_state() == PASSWORD_TO_BE_SAVED; 56 return manage_passwords_bubble_state() == PASSWORD_TO_BE_SAVED;
63 } 57 }
64 58
65 bool password_submitted() { return password_submitted_; }
66 const base::string16& title() { return title_; } 59 const base::string16& title() { return title_; }
67 const autofill::PasswordForm& pending_credentials() { 60 const autofill::PasswordForm& pending_credentials() {
68 return pending_credentials_; 61 return pending_credentials_;
69 } 62 }
70 const autofill::PasswordFormMap& best_matches() { return best_matches_; } 63 const autofill::PasswordFormMap& best_matches() { return best_matches_; }
71 const base::string16& manage_link() { return manage_link_; } 64 const base::string16& manage_link() { return manage_link_; }
72 65
73 private: 66 private:
74 // content::WebContentsObserver 67 // content::WebContentsObserver
75 virtual void WebContentsDestroyed( 68 virtual void WebContentsDestroyed(
76 content::WebContents* web_contents) OVERRIDE; 69 content::WebContents* web_contents) OVERRIDE;
77 70
78 content::WebContents* web_contents_; 71 content::WebContents* web_contents_;
79 ManagePasswordsBubbleState manage_passwords_bubble_state_; 72 ManagePasswordsBubbleState manage_passwords_bubble_state_;
80 bool password_submitted_;
81 base::string16 title_; 73 base::string16 title_;
82 autofill::PasswordForm pending_credentials_; 74 autofill::PasswordForm pending_credentials_;
83 autofill::PasswordFormMap best_matches_; 75 autofill::PasswordFormMap best_matches_;
84 base::string16 manage_link_; 76 base::string16 manage_link_;
85 77
86 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); 78 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel);
87 }; 79 };
88 80
89 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ 81 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698