ProfilePolicyConnectorFactory: Refactoring from Profile to BrowserContext.
[chromium-blink-merge.git] / ash / system / user / accounts_detailed_view.h
blob7fabcc32166aaab8fdb0560e5d961f95303cd383
1 // Copyright 2014 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 ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_
6 #define ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_
8 #include <map>
9 #include <string>
11 #include "ash/system/tray/tray_details_view.h"
12 #include "ash/system/tray/view_click_listener.h"
13 #include "ash/system/user/login_status.h"
14 #include "ash/system/user/user_accounts_delegate.h"
15 #include "ash/system/user/user_view.h"
16 #include "base/macros.h"
17 #include "ui/views/controls/button/button.h"
18 #include "ui/views/controls/label.h"
20 namespace ash {
22 class TrayUser;
24 namespace tray {
26 // This detailed view appears after a click on the primary user's card when the
27 // new account managment is enabled.
28 class AccountsDetailedView : public TrayDetailsView,
29 public ViewClickListener,
30 public views::ButtonListener,
31 public ash::tray::UserAccountsDelegate::Observer {
32 public:
33 AccountsDetailedView(TrayUser* owner, user::LoginStatus login_status);
34 ~AccountsDetailedView() override;
36 private:
37 // Overridden from ViewClickListener.
38 void OnViewClicked(views::View* sender) override;
40 // Overridden from views::ButtonListener.
41 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
43 // Overridden from ash::tray::UserAccountsDelegate::Observer.
44 void AccountListChanged() override;
46 void AddHeader(user::LoginStatus login_status);
47 void AddAccountList();
48 void AddAddAccountButton();
49 void AddFooter();
51 void UpdateAccountList();
53 views::View* CreateDeleteButton();
55 ash::tray::UserAccountsDelegate* delegate_;
56 views::View* account_list_;
57 views::View* add_account_button_;
58 views::View* add_user_button_;
59 std::map<views::View*, std::string> delete_button_to_account_id_;
61 DISALLOW_COPY_AND_ASSIGN(AccountsDetailedView);
64 } // namespace tray
65 } // namespace ash
67 #endif // ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_