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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc

Issue 943933004: Credential Manager API: add a new "Manage accounts" bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
index 2b1886ba47715113b72aec892c0e5ea8891ddfb7..e90759b420f84831673de654bf9c9ae494d12dce 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/ui/passwords/save_password_refusal_combobox_model.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/passwords/credentials_item_view.h"
+#include "chrome/browser/ui/views/passwords/manage_credential_item_view.h"
#include "chrome/browser/ui/views/passwords/manage_password_items_view.h"
#include "chrome/browser/ui/views/passwords/manage_passwords_icon_view.h"
#include "chrome/grit/generated_resources.h"
@@ -697,6 +698,40 @@ void ManagePasswordsBubbleView::ManageView::LinkClicked(views::Link* source,
parent_->Close();
}
+// ManagePasswordsBubbleView::ManageAccountsView ------------------------------
+
+// A view offering the user a list of his currently saved through the Credential
+// Manager API accounts for the current page.
+class ManagePasswordsBubbleView::ManageAccountsView : public views::View {
+ public:
+ explicit ManageAccountsView(ManagePasswordsBubbleView* parent);
+
+ private:
+ ManagePasswordsBubbleView* parent_;
+};
+
+ManagePasswordsBubbleView::ManageAccountsView::ManageAccountsView(
+ ManagePasswordsBubbleView* parent)
+ : parent_(parent) {
+ views::GridLayout* layout = new views::GridLayout(this);
+ layout->set_minimum_size(gfx::Size(kDesiredBubbleWidth, 0));
+ SetLayoutManager(layout);
+
+ // Add the title.
+ BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET);
+ AddTitleRow(layout, parent_->model());
+
+ for (const autofill::PasswordForm* form :
+ parent_->model()->local_pending_credentials()) {
+ // Add the title to the layout with appropriate padding.
+ layout->StartRow(0, SINGLE_VIEW_COLUMN_SET);
+ layout->AddView(new ManageCredentialItemView(parent_->model(), form));
+ }
+
+ // Extra padding for visual awesomeness.
+ layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
+}
+
// ManagePasswordsBubbleView::BlacklistedView ---------------------------------
// A view offering the user the ability to re-enable the password manager for
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698