Chromium Code Reviews| 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..d40639babb2bd723047b4ec9042de26a862e128f |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/passwords/manage_credential_item_view.h |
| @@ -0,0 +1,60 @@ |
| +// 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 net { |
| +class URLRequestContextGetter; |
| +} |
| + |
| +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, |
| + net::URLRequestContextGetter* request_context); |
|
Mike West
2015/02/20 16:21:39
Why do we need the request context? Seems strange.
vasilii
2015/02/20 16:58:51
It's for requesting an avatar. I removed this para
|
| + ~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_ |