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/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/session/session_state_delegate.h" | 9 #include "ash/session/session_state_delegate.h" |
10 #include "ash/system/tray/system_tray_item.h" | 10 #include "ash/system/tray/system_tray_item.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // Use for access inside of tests. | 62 // Use for access inside of tests. |
63 tray::UserView* user_view_for_test() const { return user_; } | 63 tray::UserView* user_view_for_test() const { return user_; } |
64 | 64 |
65 private: | 65 private: |
66 // Overridden from SystemTrayItem. | 66 // Overridden from SystemTrayItem. |
67 views::View* CreateTrayView(user::LoginStatus status) override; | 67 views::View* CreateTrayView(user::LoginStatus status) override; |
68 views::View* CreateDefaultView(user::LoginStatus status) override; | 68 views::View* CreateDefaultView(user::LoginStatus status) override; |
69 void DestroyTrayView() override; | 69 void DestroyTrayView() override; |
70 void DestroyDefaultView() override; | 70 void DestroyDefaultView() override; |
71 void UpdateAfterLoginStatusChange(user::LoginStatus status) override; | 71 void UpdateAfterLoginStatusChange(user::LoginStatus status) override; |
72 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; | 72 void UpdateAfterShelfAlignmentChange(wm::ShelfAlignment alignment) override; |
73 | 73 |
74 // Overridden from UserObserver. | 74 // Overridden from UserObserver. |
75 void OnUserUpdate() override; | 75 void OnUserUpdate() override; |
76 void OnUserAddedToSession() override; | 76 void OnUserAddedToSession() override; |
77 | 77 |
78 void UpdateAvatarImage(user::LoginStatus status); | 78 void UpdateAvatarImage(user::LoginStatus status); |
79 | 79 |
80 // Updates the layout of this item. | 80 // Updates the layout of this item. |
81 void UpdateLayoutOfItem(); | 81 void UpdateLayoutOfItem(); |
82 | 82 |
83 // The user index to use. | 83 // The user index to use. |
84 UserIndex user_index_; | 84 UserIndex user_index_; |
85 | 85 |
86 tray::UserView* user_; | 86 tray::UserView* user_; |
87 | 87 |
88 // View that contains label and/or avatar. | 88 // View that contains label and/or avatar. |
89 views::View* layout_view_; | 89 views::View* layout_view_; |
90 tray::RoundedImageView* avatar_; | 90 tray::RoundedImageView* avatar_; |
91 views::Label* label_; | 91 views::Label* label_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(TrayUser); | 93 DISALLOW_COPY_AND_ASSIGN(TrayUser); |
94 }; | 94 }; |
95 | 95 |
96 } // namespace ash | 96 } // namespace ash |
97 | 97 |
98 #endif // ASH_SYSTEM_USER_TRAY_USER_H_ | 98 #endif // ASH_SYSTEM_USER_TRAY_USER_H_ |
OLD | NEW |