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_ITEMS_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEMS_VIEW_H_
10 #include "components/autofill/core/common/password_form.h"
11 #include "ui/views/view.h"
13 class ManagePasswordsBubbleModel
;
15 // A custom view of individual credentials. The view is represented as a table
16 // where each row can be in three distinct states:
18 // * Present credentials to the user which she may choose to save.
19 // * Present already-saved credentials to the user for management.
20 // * Offer the user the ability to undo a deletion action.
21 class ManagePasswordItemsView
: public views::View
{
23 ManagePasswordItemsView(
24 ManagePasswordsBubbleModel
* manage_passwords_bubble_model
,
25 const std::vector
<const autofill::PasswordForm
*>& password_forms
);
28 class PasswordFormRow
;
30 ~ManagePasswordItemsView() override
;
33 void NotifyPasswordFormStatusChanged(
34 const autofill::PasswordForm
& password_form
, bool deleted
);
36 // Changes the views according to the state of |password_forms_rows_|.
39 std::vector
<PasswordFormRow
> password_forms_rows_
;
40 ManagePasswordsBubbleModel
* model_
;
42 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemsView
);
45 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEMS_VIEW_H_