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 |