Add ENABLE_MEDIA_ROUTER define to builds other than Android and iOS.
[chromium-blink-merge.git] / chrome / browser / ui / views / passwords / manage_password_items_view.h
blob379b78743f2b606bcf39f00675890987dbc29a87
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_
8 #include <vector>
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 {
22 public:
23 ManagePasswordItemsView(
24 ManagePasswordsBubbleModel* manage_passwords_bubble_model,
25 const std::vector<const autofill::PasswordForm*>& password_forms);
27 private:
28 class PasswordFormRow;
30 ~ManagePasswordItemsView() override;
32 void AddRows();
33 void NotifyPasswordFormStatusChanged(
34 const autofill::PasswordForm& password_form, bool deleted);
36 // Changes the views according to the state of |password_forms_rows_|.
37 void Refresh();
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_