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

Side by Side Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h

Issue 347033002: Password bubble: Confirm blacklisting a site if passwords exist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Layout. Created 6 years, 6 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_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" 9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h"
10 #include "chrome/browser/ui/views/passwords/save_password_refusal_combobox_model .h" 10 #include "chrome/browser/ui/views/passwords/save_password_refusal_combobox_model .h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 views::BlueButton* save_button_; 61 views::BlueButton* save_button_;
62 62
63 // The combobox doesn't take ownership of its model. If we created a 63 // The combobox doesn't take ownership of its model. If we created a
64 // combobox we need to ensure that we delete the model here, and because the 64 // combobox we need to ensure that we delete the model here, and because the
65 // combobox uses the model in it's destructor, we need to make sure we 65 // combobox uses the model in it's destructor, we need to make sure we
66 // delete the model _after_ the combobox itself is deleted. 66 // delete the model _after_ the combobox itself is deleted.
67 scoped_ptr<SavePasswordRefusalComboboxModel> combobox_model_; 67 scoped_ptr<SavePasswordRefusalComboboxModel> combobox_model_;
68 scoped_ptr<views::Combobox> refuse_combobox_; 68 scoped_ptr<views::Combobox> refuse_combobox_;
69 }; 69 };
70 70
71 // A view offering the user the ability to undo her decision to never save
72 // passwords for a particular site.
73 class ConfirmNeverView : public views::View, public views::ButtonListener {
74 public:
75 explicit ConfirmNeverView(ManagePasswordsBubbleView* parent);
76 virtual ~ConfirmNeverView();
77
78 private:
79 // views::ButtonListener:
80 virtual void ButtonPressed(views::Button* sender,
81 const ui::Event& event) OVERRIDE;
82
83 ManagePasswordsBubbleView* parent_;
84
85 views::LabelButton* confirm_button_;
86 views::LabelButton* undo_button_;
87 };
88
71 // A view offering the user a list of her currently saved credentials 89 // A view offering the user a list of her currently saved credentials
72 // for the current page, along with a "Manage passwords" link and a 90 // for the current page, along with a "Manage passwords" link and a
73 // "Done" button. 91 // "Done" button.
74 class ManageView : public views::View, 92 class ManageView : public views::View,
75 public views::ButtonListener, 93 public views::ButtonListener,
76 public views::LinkListener { 94 public views::LinkListener {
77 public: 95 public:
78 explicit ManageView(ManagePasswordsBubbleView* parent); 96 explicit ManageView(ManagePasswordsBubbleView* parent);
79 virtual ~ManageView(); 97 virtual ~ManageView();
80 98
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 146
129 // If the bubble is not anchored to a view, places the bubble in the top 147 // If the bubble is not anchored to a view, places the bubble in the top
130 // right (left in RTL) of the |screen_bounds| that contain |web_contents_|'s 148 // right (left in RTL) of the |screen_bounds| that contain |web_contents_|'s
131 // browser window. Because the positioning is based on the size of the 149 // browser window. Because the positioning is based on the size of the
132 // bubble, this must be called after the bubble is created. 150 // bubble, this must be called after the bubble is created.
133 void AdjustForFullscreen(const gfx::Rect& screen_bounds); 151 void AdjustForFullscreen(const gfx::Rect& screen_bounds);
134 152
135 // Close the bubble. 153 // Close the bubble.
136 void Close(); 154 void Close();
137 155
156 // Refreshes the bubble's state: called to display a confirmation screen after
157 // a user selects "Never for this site", for instance.
158 void Refresh();
159
160 // Called from PendingView if the user clicks on "Never for this site" in
161 // order to display a confirmation screen.
162 void NotifyNeverForThisSiteClicked();
163
164 // Called from ConfirmNeverView if the user confirms her intention to never
165 // save passwords, and remove existing passwords, for a site.
166 void NotifyConfirmedNeverForThisSite();
167
168 // Called from ConfirmNeverView if the user clicks on "Undo" in order to
169 // undo the action and refresh to PendingView.
170 void NotifyUndoNeverForThisSite();
171
138 // views::BubbleDelegateView: 172 // views::BubbleDelegateView:
139 virtual void Init() OVERRIDE; 173 virtual void Init() OVERRIDE;
140 virtual void WindowClosing() OVERRIDE; 174 virtual void WindowClosing() OVERRIDE;
141 175
142 // Singleton instance of the Password bubble. The Password bubble can only be 176 // Singleton instance of the Password bubble. The Password bubble can only be
143 // shown on the active browser window, so there is no case in which it will be 177 // shown on the active browser window, so there is no case in which it will be
144 // shown twice at the same time. 178 // shown twice at the same time.
145 static ManagePasswordsBubbleView* manage_passwords_bubble_; 179 static ManagePasswordsBubbleView* manage_passwords_bubble_;
146 180
147 ManagePasswordsIconView* anchor_view_; 181 ManagePasswordsIconView* anchor_view_;
148 182
183 // If true upon destruction, the user has confirmed that she never wants to
184 // save passwords for a particular site.
185 bool never_save_passwords_;
186
149 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); 187 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView);
150 }; 188 };
151 189
152 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ 190 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698