1 // Copyright 2013 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_PASSWORD_ITEM_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_
8 #include "components/autofill/core/common/password_form.h"
9 #include "components/password_manager/core/common/password_manager_ui.h"
10 #include "ui/views/view.h"
12 class ManagePasswordsBubbleModel;
14 // A custom view for credentials which allows the management of the specific
15 // credentials. The view has three distinct states:
17 // * Present credentials to the user which she may choose to save.
18 // * Present already-saved credentials to the user for management.
19 // * Offer the user the ability to undo a deletion action.
21 // The ManagePasswordItemView serves as a container for a single view
22 // representing one of these states.
23 class ManagePasswordItemView : public views::View {
25 ManagePasswordItemView(
26 ManagePasswordsBubbleModel* manage_passwords_bubble_model,
27 const autofill::PasswordForm& password_form,
28 password_manager::ui::PasswordItemPosition position);
35 virtual ~ManagePasswordItemView();
37 void NotifyClickedDelete();
38 void NotifyClickedUndo();
40 // Changes the views according to the state of |delete_password_|.
43 ManagePasswordsBubbleModel* model_;
44 autofill::PasswordForm password_form_;
45 bool delete_password_;
47 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView);
50 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_