blob: 8b6f8f36d293c11f5b6e73db6939dad6bd11ff93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_
#define ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_
#include <map>
#include <string>
#include "ash/system/tray/tray_details_view.h"
#include "ash/system/tray/view_click_listener.h"
#include "ash/system/user/login_status.h"
#include "ash/system/user/user_accounts_delegate.h"
#include "ash/system/user/user_view.h"
#include "base/macros.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/label.h"
namespace ash {
class TrayUser;
namespace tray {
// This detailed view appears after a click on the primary user's card when the
// new account managment is enabled.
class AccountsDetailedView : public TrayDetailsView,
public ViewClickListener,
public views::ButtonListener,
public ash::tray::UserAccountsDelegate::Observer {
public:
AccountsDetailedView(TrayUser* owner,
user::LoginStatus login_status,
UserAccountsDelegate* delegate);
~AccountsDetailedView() override;
private:
// Overridden from ViewClickListener.
void OnViewClicked(views::View* sender) override;
// Overridden from views::ButtonListener.
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
// Overridden from ash::tray::UserAccountsDelegate::Observer.
void AccountListChanged() override;
void AddHeader(user::LoginStatus login_status);
void AddAccountList();
void AddAddAccountButton();
void AddFooter();
void UpdateAccountList();
views::View* CreateDeleteButton();
UserAccountsDelegate* delegate_;
views::View* account_list_;
views::View* add_account_button_;
views::View* add_user_button_;
std::map<views::View*, std::string> delete_button_to_account_id_;
DISALLOW_COPY_AND_ASSIGN(AccountsDetailedView);
};
} // namespace tray
} // namespace ash
#endif // ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_
|