Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ash / system / user / accounts_detailed_view.h
blob99ee2b3551fe3596af4faf94d4719b9ae920adb0
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 "grit/ash_strings.h"
18 #include "ui/views/controls/button/button.h"
19 #include "ui/views/controls/label.h"
21 namespace ash {
23 class TrayUser;
25 namespace tray {
27 // This detailed view appears after a click on the primary user's card when the
28 // new account managment is enabled.
29 class AccountsDetailedView : public TrayDetailsView,
30 public ViewClickListener,
31 public views::ButtonListener,
32 public ash::tray::UserAccountsDelegate::Observer {
33 public:
34 AccountsDetailedView(TrayUser* owner, user::LoginStatus login_status);
35 virtual ~AccountsDetailedView();
37 private:
38 // Overridden from ViewClickListener.
39 virtual void OnViewClicked(views::View* sender) OVERRIDE;
41 // Overridden from views::ButtonListener.
42 virtual void ButtonPressed(views::Button* sender,
43 const ui::Event& event) OVERRIDE;
45 // Overridden from ash::tray::UserAccountsDelegate::Observer.
46 virtual void AccountListChanged() OVERRIDE;
48 void AddHeader(user::LoginStatus login_status);
49 void AddAccountList();
50 void AddAddAccountButton();
51 void AddFooter();
53 void UpdateAccountList();
55 views::View* CreateDeleteButton();
57 ash::tray::UserAccountsDelegate* delegate_;
58 views::View* account_list_;
59 views::View* add_account_button_;
60 views::View* add_user_button_;
61 std::map<views::View*, std::string> delete_button_to_account_id_;
63 DISALLOW_COPY_AND_ASSIGN(AccountsDetailedView);
66 } // namespace tray
67 } // namespace ash
69 #endif // ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_