Revert of Remove OneClickSigninHelper since it is no longer used. (patchset #5 id...
[chromium-blink-merge.git] / chrome / browser / ui / views / passwords / manage_credential_item_view.h
blob1b1d25ccb0ad009548a9d19b4dbae7b8f295589f
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/autofill/core/common/password_form.h"
11 #include "ui/views/controls/button/button.h"
12 #include "ui/views/controls/link_listener.h"
14 class CredentialsItemView;
15 class ManagePasswordsBubbleModel;
17 namespace views {
18 class ImageButton;
19 class Link;
22 // A custom view that represents one credential row. There are two states:
23 // * Present a credential to the user for management.
24 // * Offer the user the ability to undo a deletion action.
25 class ManageCredentialItemView : public views::View,
26 public views::ButtonListener,
27 public views::LinkListener {
28 public:
29 ManageCredentialItemView(ManagePasswordsBubbleModel* model,
30 const autofill::PasswordForm* password_form);
31 ~ManageCredentialItemView() override;
33 private:
34 void Refresh();
36 // ButtonListener:
37 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
39 // LinkListener:
40 void LinkClicked(views::Link* source, int event_flags) override;
42 autofill::PasswordForm form_;
43 scoped_ptr<CredentialsItemView> credential_button_;
44 views::ImageButton* delete_button_;
45 views::Link* undo_link_;
47 ManagePasswordsBubbleModel* const model_;
48 bool form_deleted_;
50 DISALLOW_COPY_AND_ASSIGN(ManageCredentialItemView);
53 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_H_