| 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 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 class ImageView; | 12 class ImageView; |
| 13 class Label; | 13 class Label; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace ash { | 16 namespace ash { |
| 17 namespace internal { | 17 namespace internal { |
| 18 | 18 |
| 19 namespace tray { | 19 namespace tray { |
| 20 class UserView; | 20 class UserView; |
| 21 class RoundedImageView; | 21 class RoundedImageView; |
| 22 } | 22 } |
| 23 | 23 |
| 24 class TrayUser : public SystemTrayItem, | 24 class TrayUser : public SystemTrayItem, |
| 25 public UserObserver { | 25 public UserObserver { |
| 26 public: | 26 public: |
| 27 TrayUser(); | 27 explicit TrayUser(SystemTray* system_tray); |
| 28 virtual ~TrayUser(); | 28 virtual ~TrayUser(); |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 // Overridden from SystemTrayItem | 31 // Overridden from SystemTrayItem |
| 32 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; | 32 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; |
| 33 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; | 33 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; |
| 34 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; | 34 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; |
| 35 virtual void DestroyTrayView() OVERRIDE; | 35 virtual void DestroyTrayView() OVERRIDE; |
| 36 virtual void DestroyDefaultView() OVERRIDE; | 36 virtual void DestroyDefaultView() OVERRIDE; |
| 37 virtual void DestroyDetailedView() OVERRIDE; | 37 virtual void DestroyDetailedView() OVERRIDE; |
| 38 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; | 38 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; |
| 39 virtual void UpdateAfterShelfAlignmentChange( | 39 virtual void UpdateAfterShelfAlignmentChange( |
| 40 ShelfAlignment alignment) OVERRIDE; | 40 ShelfAlignment alignment) OVERRIDE; |
| 41 | 41 |
| 42 // Overridden from UserObserver. | 42 // Overridden from UserObserver. |
| 43 virtual void OnUserUpdate() OVERRIDE; | 43 virtual void OnUserUpdate() OVERRIDE; |
| 44 | 44 |
| 45 tray::UserView* user_; | 45 tray::UserView* user_; |
| 46 tray::RoundedImageView* avatar_; | 46 tray::RoundedImageView* avatar_; |
| 47 views::Label* label_; | 47 views::Label* label_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(TrayUser); | 49 DISALLOW_COPY_AND_ASSIGN(TrayUser); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace internal | 52 } // namespace internal |
| 53 } // namespace ash | 53 } // namespace ash |
| 54 | 54 |
| 55 #endif // ASH_SYSTEM_USER_TRAY_USER_H_ | 55 #endif // ASH_SYSTEM_USER_TRAY_USER_H_ |
| OLD | NEW |