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 "base/memory/scoped_vector.h"
11 #include "components/autofill/core/common/password_form.h"
12 #include "ui/views/view.h"
14 class ManagePasswordsBubbleModel
;
16 // A custom view of individual credentials. The view is represented as a table
17 // where each row can be in three distinct states:
19 // * Present credentials to the user which she may choose to save.
20 // * Present already-saved credentials to the user for management.
21 // * Offer the user the ability to undo a deletion action.
22 class ManagePasswordItemsView
: public views::View
{
24 ManagePasswordItemsView(
25 ManagePasswordsBubbleModel
* manage_passwords_bubble_model
,
26 const std::vector
<const autofill::PasswordForm
*>& password_forms
);
29 class PasswordFormRow
;
31 ~ManagePasswordItemsView() override
;
34 void NotifyPasswordFormStatusChanged(
35 const autofill::PasswordForm
& password_form
, bool deleted
);
37 // Changes the views according to the state of |password_forms_rows_|.
40 ScopedVector
<PasswordFormRow
> password_forms_rows_
;
41 ManagePasswordsBubbleModel
* model_
;
43 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemsView
);
46 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEMS_VIEW_H_