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

Side by Side Diff: chrome/browser/ui/views/passwords/manage_password_item_view.cc

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 #include "chrome/browser/ui/views/passwords/manage_password_item_view.h" 5 #include "chrome/browser/ui/views/passwords/manage_password_item_view.h"
6 6
7 #include "grit/generated_resources.h" 7 #include "grit/generated_resources.h"
8 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 GetNativeTheme()->GetSystemColor( 120 GetNativeTheme()->GetSystemColor(
121 ui::NativeTheme::kColorId_EnabledMenuButtonBorderColor))); 121 ui::NativeTheme::kColorId_EnabledMenuButtonBorderColor)));
122 122
123 if (manage_passwords_bubble_model_->WaitingToSavePassword()) 123 if (manage_passwords_bubble_model_->WaitingToSavePassword())
124 AddChildView(new PendingView(this)); 124 AddChildView(new PendingView(this));
125 else 125 else
126 AddChildView(new ManageView(this)); 126 AddChildView(new ManageView(this));
127 GetLayoutManager()->Layout(this); 127 GetLayoutManager()->Layout(this);
128 } 128 }
129 129
130 ManagePasswordItemView::~ManagePasswordItemView() { 130 ManagePasswordItemView::~ManagePasswordItemView() {}
131 if (delete_password_)
132 manage_passwords_bubble_model_->DeleteFromBestMatches(password_form_);
133 }
134 131
135 void ManagePasswordItemView::BuildColumnSet(views::GridLayout* layout, 132 void ManagePasswordItemView::BuildColumnSet(views::GridLayout* layout,
136 int column_set_id) { 133 int column_set_id) {
137 views::ColumnSet* column_set = layout->AddColumnSet(column_set_id); 134 views::ColumnSet* column_set = layout->AddColumnSet(column_set_id);
138 135
139 // The username/"Deleted!" field. 136 // The username/"Deleted!" field.
140 column_set->AddPaddingColumn(0, views::kItemLabelSpacing); 137 column_set->AddPaddingColumn(0, views::kItemLabelSpacing);
141 column_set->AddColumn(views::GridLayout::FILL, 138 column_set->AddColumn(views::GridLayout::FILL,
142 views::GridLayout::FILL, 139 views::GridLayout::FILL,
143 0, 140 0,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 201
205 void ManagePasswordItemView::NotifyClickedDelete() { 202 void ManagePasswordItemView::NotifyClickedDelete() {
206 delete_password_ = true; 203 delete_password_ = true;
207 Refresh(); 204 Refresh();
208 } 205 }
209 206
210 void ManagePasswordItemView::NotifyClickedUndo() { 207 void ManagePasswordItemView::NotifyClickedUndo() {
211 delete_password_ = false; 208 delete_password_ = false;
212 Refresh(); 209 Refresh();
213 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698