| 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/public/cpp/session_types.h" | 9 #include "ash/public/cpp/session_types.h" |
| 10 #include "ash/session/session_observer.h" | 10 #include "ash/session/session_observer.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 tray::UserView* user_view_for_test() const { return user_; } | 60 tray::UserView* user_view_for_test() const { return user_; } |
| 61 tray::RoundedImageView* avatar_view_for_test() const { return avatar_; } | 61 tray::RoundedImageView* avatar_view_for_test() const { return avatar_; } |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 // Overridden from SystemTrayItem. | 64 // Overridden from SystemTrayItem. |
| 65 views::View* CreateTrayView(LoginStatus status) override; | 65 views::View* CreateTrayView(LoginStatus status) override; |
| 66 views::View* CreateDefaultView(LoginStatus status) override; | 66 views::View* CreateDefaultView(LoginStatus status) override; |
| 67 void DestroyTrayView() override; | 67 void DestroyTrayView() override; |
| 68 void DestroyDefaultView() override; | 68 void DestroyDefaultView() override; |
| 69 void UpdateAfterLoginStatusChange(LoginStatus status) override; | 69 void UpdateAfterLoginStatusChange(LoginStatus status) override; |
| 70 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; | 70 void UpdateAfterShelfAlignmentChange() override; |
| 71 | 71 |
| 72 // Overridden from SessionObserver. | 72 // Overridden from SessionObserver. |
| 73 void OnActiveUserSessionChanged(const AccountId& account_id) override; | 73 void OnActiveUserSessionChanged(const AccountId& account_id) override; |
| 74 void OnUserSessionAdded(const AccountId& account_id) override; | 74 void OnUserSessionAdded(const AccountId& account_id) override; |
| 75 void OnUserSessionUpdated(const AccountId& account_id) override; | 75 void OnUserSessionUpdated(const AccountId& account_id) override; |
| 76 | 76 |
| 77 void UpdateAvatarImage(LoginStatus status); | 77 void UpdateAvatarImage(LoginStatus status); |
| 78 | 78 |
| 79 // Updates the layout of this item. | 79 // Updates the layout of this item. |
| 80 void UpdateLayoutOfItem(); | 80 void UpdateLayoutOfItem(); |
| 81 | 81 |
| 82 ScopedSessionObserver scoped_session_observer_; | 82 ScopedSessionObserver scoped_session_observer_; |
| 83 | 83 |
| 84 // The user index to use. | 84 // The user index to use. |
| 85 const UserIndex user_index_; | 85 const UserIndex user_index_; |
| 86 | 86 |
| 87 tray::UserView* user_ = nullptr; | 87 tray::UserView* user_ = nullptr; |
| 88 | 88 |
| 89 // View that contains label and/or avatar. | 89 // View that contains label and/or avatar. |
| 90 views::View* layout_view_ = nullptr; | 90 views::View* layout_view_ = nullptr; |
| 91 tray::RoundedImageView* avatar_ = nullptr; | 91 tray::RoundedImageView* avatar_ = nullptr; |
| 92 views::Label* label_ = nullptr; | 92 views::Label* label_ = nullptr; |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(TrayUser); | 94 DISALLOW_COPY_AND_ASSIGN(TrayUser); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace ash | 97 } // namespace ash |
| 98 | 98 |
| 99 #endif // ASH_SYSTEM_USER_TRAY_USER_H_ | 99 #endif // ASH_SYSTEM_USER_TRAY_USER_H_ |
| OLD | NEW |