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

Unified Diff: chrome/browser/ui/views/passwords/manage_credential_item_view.h

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
Index: chrome/browser/ui/views/passwords/manage_credential_item_view.h
diff --git a/chrome/browser/ui/views/passwords/manage_credential_item_view.h b/chrome/browser/ui/views/passwords/manage_credential_item_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..e712957fa15b2e3799ab6aa3bd143af27632af14
--- /dev/null
+++ b/chrome/browser/ui/views/passwords/manage_credential_item_view.h
@@ -0,0 +1,55 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_H_
+#define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/views/controls/button/button.h"
+#include "ui/views/controls/link_listener.h"
+
+class CredentialsItemView;
+class ManagePasswordsBubbleModel;
+
+namespace autofill {
+struct PasswordForm;
+}
+
+namespace views {
+class ImageButton;
+class Link;
+}
+
+// A custom view that represents one credential row. There are two states:
+// * Present a credential to the user for management.
+// * Offer the user the ability to undo a deletion action.
+class ManageCredentialItemView : public views::View,
+ public views::ButtonListener,
+ public views::LinkListener {
+ public:
+ ManageCredentialItemView(ManagePasswordsBubbleModel* model,
+ const autofill::PasswordForm* password_form);
+ ~ManageCredentialItemView() override;
+
+ private:
+ void Refresh();
+
+ // ButtonListener:
+ void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+
+ // LinkListener:
+ void LinkClicked(views::Link* source, int event_flags) override;
+
+ scoped_ptr<CredentialsItemView> credential_button_;
+ views::ImageButton* delete_button_;
+ views::Link* undo_link_;
+
+ ManagePasswordsBubbleModel* const model_;
+ bool form_deleted_;
+
+ DISALLOW_COPY_AND_ASSIGN(ManageCredentialItemView);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_H_
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/views/passwords/manage_credential_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698