Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Side by Side Diff: ash/system/user/accounts_detailed_view.h

Issue 210903003: Implemented system tray UI for new account management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge conflicts resolved. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/tray_details_view.cc ('k') | ash/system/user/accounts_detailed_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_
6 #define ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_
7
8 #include <map>
9 #include <string>
10
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/base/l10n/l10n_util.h"
19 #include "ui/views/controls/button/button.h"
20 #include "ui/views/controls/label.h"
21
22 namespace ash {
23
24 class TrayUser;
25
26 namespace tray {
27
28 // This detailed view appears after a click on the primary user's card when the
29 // new account managment is enabled.
30 class AccountsDetailedView : public TrayDetailsView,
31 public ViewClickListener,
32 public views::ButtonListener,
33 public ash::tray::UserAccountsDelegate::Observer {
34 public:
35 AccountsDetailedView(TrayUser* owner, user::LoginStatus login_status);
36 virtual ~AccountsDetailedView();
37
38 private:
39 // Overridden from ViewClickListener.
40 virtual void OnViewClicked(views::View* sender) OVERRIDE;
41
42 // Overridden from views::ButtonListener.
43 virtual void ButtonPressed(views::Button* sender,
44 const ui::Event& event) OVERRIDE;
45
46 // Overridden from ash::tray::UserAccountsDelegate::Observer.
47 virtual void AccountListChanged() OVERRIDE;
48
49 void AddHeader(user::LoginStatus login_status);
50 void AddAccountList();
51 void AddAddAccountButton();
52 void AddFooter();
53
54 void UpdateAccountList();
55
56 views::View* CreateDeleteButton();
57
58 ash::tray::UserAccountsDelegate* delegate_;
59 views::View* account_list_;
60 views::View* add_account_button_;
61 views::View* add_user_button_;
62 std::map<views::View*, std::string> delete_button_to_account_id_;
63
64 DISALLOW_COPY_AND_ASSIGN(AccountsDetailedView);
65 };
66
67 } // namespace tray
68 } // namespace ash
69
70 #endif // ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/tray/tray_details_view.cc ('k') | ash/system/user/accounts_detailed_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698