OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_SYSTEM_USER_TRAY_USER_H_ | 5 #ifndef ASH_SYSTEM_USER_TRAY_USER_H_ |
6 #define ASH_SYSTEM_USER_TRAY_USER_H_ | 6 #define ASH_SYSTEM_USER_TRAY_USER_H_ |
7 | 7 |
8 #include "ash/system/tray/system_tray_item.h" | 8 #include "ash/system/tray/system_tray_item.h" |
9 #include "ash/system/user/user_observer.h" | 9 #include "ash/system/user/user_observer.h" |
| 10 #include "base/compiler_specific.h" |
10 | 11 |
11 namespace views { | 12 namespace views { |
12 class ImageView; | 13 class ImageView; |
13 class Label; | 14 class Label; |
14 } | 15 } |
15 | 16 |
16 namespace ash { | 17 namespace ash { |
17 namespace internal { | 18 namespace internal { |
18 | 19 |
19 namespace tray { | 20 namespace tray { |
20 class UserView; | 21 class UserView; |
21 class RoundedImageView; | 22 class RoundedImageView; |
22 } | 23 } |
23 | 24 |
24 class TrayUser : public SystemTrayItem, | 25 class TrayUser : public SystemTrayItem, |
25 public UserObserver { | 26 public UserObserver { |
26 public: | 27 public: |
27 explicit TrayUser(SystemTray* system_tray); | 28 explicit TrayUser(SystemTray* system_tray); |
28 virtual ~TrayUser(); | 29 virtual ~TrayUser(); |
29 | 30 |
30 private: | 31 private: |
31 // Overridden from SystemTrayItem | 32 // Overridden from SystemTrayItem. |
32 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; | 33 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; |
33 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; | 34 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; |
34 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; | 35 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; |
35 virtual void DestroyTrayView() OVERRIDE; | 36 virtual void DestroyTrayView() OVERRIDE; |
36 virtual void DestroyDefaultView() OVERRIDE; | 37 virtual void DestroyDefaultView() OVERRIDE; |
37 virtual void DestroyDetailedView() OVERRIDE; | 38 virtual void DestroyDetailedView() OVERRIDE; |
38 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; | 39 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; |
39 virtual void UpdateAfterShelfAlignmentChange( | 40 virtual void UpdateAfterShelfAlignmentChange( |
40 ShelfAlignment alignment) OVERRIDE; | 41 ShelfAlignment alignment) OVERRIDE; |
41 | 42 |
42 // Overridden from UserObserver. | 43 // Overridden from UserObserver. |
43 virtual void OnUserUpdate() OVERRIDE; | 44 virtual void OnUserUpdate() OVERRIDE; |
44 | 45 |
45 tray::UserView* user_; | 46 tray::UserView* user_; |
46 tray::RoundedImageView* avatar_; | 47 tray::RoundedImageView* avatar_; |
47 views::Label* label_; | 48 views::Label* label_; |
48 | 49 |
49 DISALLOW_COPY_AND_ASSIGN(TrayUser); | 50 DISALLOW_COPY_AND_ASSIGN(TrayUser); |
50 }; | 51 }; |
51 | 52 |
52 } // namespace internal | 53 } // namespace internal |
53 } // namespace ash | 54 } // namespace ash |
54 | 55 |
55 #endif // ASH_SYSTEM_USER_TRAY_USER_H_ | 56 #endif // ASH_SYSTEM_USER_TRAY_USER_H_ |
OLD | NEW |