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

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

Issue 854173003: Credential Management API: the account chooser dialog supports custom avatars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added a test Created 5 years, 11 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
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_passwords_bubble_view.h" 5 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h"
6 6
7 #include "chrome/browser/profiles/profile.h"
7 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_finder.h" 9 #include "chrome/browser/ui/browser_finder.h"
9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" 10 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
10 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" 11 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
11 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" 12 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
12 #include "chrome/browser/ui/passwords/save_password_refusal_combobox_model.h" 13 #include "chrome/browser/ui/passwords/save_password_refusal_combobox_model.h"
13 #include "chrome/browser/ui/views/frame/browser_view.h" 14 #include "chrome/browser/ui/views/frame/browser_view.h"
14 #include "chrome/browser/ui/views/passwords/credentials_item_view.h" 15 #include "chrome/browser/ui/views/passwords/credentials_item_view.h"
15 #include "chrome/browser/ui/views/passwords/manage_password_items_view.h" 16 #include "chrome/browser/ui/views/passwords/manage_password_items_view.h"
16 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_view.h" 17 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_view.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 cancel_button_->SetStyle(views::Button::STYLE_BUTTON); 202 cancel_button_->SetStyle(views::Button::STYLE_BUTTON);
202 cancel_button_->SetFontList( 203 cancel_button_->SetFontList(
203 ui::ResourceBundle::GetSharedInstance().GetFontList( 204 ui::ResourceBundle::GetSharedInstance().GetFontList(
204 ui::ResourceBundle::SmallFont)); 205 ui::ResourceBundle::SmallFont));
205 206
206 // Title row. 207 // Title row.
207 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET); 208 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET);
208 AddTitleRow(layout, parent_->model()); 209 AddTitleRow(layout, parent_->model());
209 210
210 const auto& pending_credentials = parent_->model()->pending_credentials(); 211 const auto& pending_credentials = parent_->model()->pending_credentials();
212 net::URLRequestContextGetter* request_context =
213 parent_->model()->GetProfile()->GetRequestContext();
211 for (autofill::PasswordForm* form : pending_credentials) { 214 for (autofill::PasswordForm* form : pending_credentials) {
212 CredentialsItemView* credential_view = new CredentialsItemView(this, *form); 215 CredentialsItemView* credential_view =
216 new CredentialsItemView(this, *form, request_context);
213 // Add the title to the layout with appropriate padding. 217 // Add the title to the layout with appropriate padding.
214 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET); 218 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET);
215 layout->AddView(credential_view); 219 layout->AddView(credential_view);
216 } 220 }
217 221
218 // Button row. 222 // Button row.
219 BuildColumnSet(layout, SINGLE_BUTTON_COLUMN_SET); 223 BuildColumnSet(layout, SINGLE_BUTTON_COLUMN_SET);
220 layout->StartRowWithPadding( 224 layout->StartRowWithPadding(
221 0, SINGLE_BUTTON_COLUMN_SET, 0, views::kRelatedControlVerticalSpacing); 225 0, SINGLE_BUTTON_COLUMN_SET, 0, views::kRelatedControlVerticalSpacing);
222 layout->AddView(cancel_button_); 226 layout->AddView(cancel_button_);
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 974
971 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { 975 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() {
972 if (model()->best_matches().empty()) { 976 if (model()->best_matches().empty()) {
973 // Skip confirmation if there are no existing passwords for this site. 977 // Skip confirmation if there are no existing passwords for this site.
974 NotifyConfirmedNeverForThisSite(); 978 NotifyConfirmedNeverForThisSite();
975 } else { 979 } else {
976 model()->OnConfirmationForNeverForThisSite(); 980 model()->OnConfirmationForNeverForThisSite();
977 Refresh(); 981 Refresh();
978 } 982 }
979 } 983 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698