| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // Returns the bounds of the user panel in screen coordinates. | 54 // Returns the bounds of the user panel in screen coordinates. |
| 55 // Note: This only works when the panel shown. | 55 // Note: This only works when the panel shown. |
| 56 gfx::Rect GetUserPanelBoundsInScreenForTest() const; | 56 gfx::Rect GetUserPanelBoundsInScreenForTest() const; |
| 57 | 57 |
| 58 // Update the TrayUser as if the current LoginStatus is |status|. | 58 // Update the TrayUser as if the current LoginStatus is |status|. |
| 59 void UpdateAfterLoginStatusChangeForTest(user::LoginStatus status); | 59 void UpdateAfterLoginStatusChangeForTest(user::LoginStatus status); |
| 60 | 60 |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 // Overridden from SystemTrayItem. | 63 // Overridden from SystemTrayItem. |
| 64 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; | 64 virtual views::View* CreateTrayView(user::LoginStatus status) override; |
| 65 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; | 65 virtual views::View* CreateDefaultView(user::LoginStatus status) override; |
| 66 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; | 66 virtual views::View* CreateDetailedView(user::LoginStatus status) override; |
| 67 virtual void DestroyTrayView() OVERRIDE; | 67 virtual void DestroyTrayView() override; |
| 68 virtual void DestroyDefaultView() OVERRIDE; | 68 virtual void DestroyDefaultView() override; |
| 69 virtual void DestroyDetailedView() OVERRIDE; | 69 virtual void DestroyDetailedView() override; |
| 70 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; | 70 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) override; |
| 71 virtual void UpdateAfterShelfAlignmentChange( | 71 virtual void UpdateAfterShelfAlignmentChange( |
| 72 ShelfAlignment alignment) OVERRIDE; | 72 ShelfAlignment alignment) override; |
| 73 | 73 |
| 74 // Overridden from UserObserver. | 74 // Overridden from UserObserver. |
| 75 virtual void OnUserUpdate() OVERRIDE; | 75 virtual void OnUserUpdate() override; |
| 76 virtual void OnUserAddedToSession() OVERRIDE; | 76 virtual void OnUserAddedToSession() override; |
| 77 | 77 |
| 78 void UpdateAvatarImage(user::LoginStatus status); | 78 void UpdateAvatarImage(user::LoginStatus status); |
| 79 | 79 |
| 80 // Get the user index which should be used for the tray icon of this item. | 80 // Get the user index which should be used for the tray icon of this item. |
| 81 MultiProfileIndex GetTrayIndex(); | 81 MultiProfileIndex GetTrayIndex(); |
| 82 | 82 |
| 83 // Updates the layout of this item. | 83 // Updates the layout of this item. |
| 84 void UpdateLayoutOfItem(); | 84 void UpdateLayoutOfItem(); |
| 85 | 85 |
| 86 // The user index to use. | 86 // The user index to use. |
| 87 MultiProfileIndex multiprofile_index_; | 87 MultiProfileIndex multiprofile_index_; |
| 88 | 88 |
| 89 tray::UserView* user_; | 89 tray::UserView* user_; |
| 90 | 90 |
| 91 // View that contains label and/or avatar. | 91 // View that contains label and/or avatar. |
| 92 views::View* layout_view_; | 92 views::View* layout_view_; |
| 93 tray::RoundedImageView* avatar_; | 93 tray::RoundedImageView* avatar_; |
| 94 views::Label* label_; | 94 views::Label* label_; |
| 95 | 95 |
| 96 DISALLOW_COPY_AND_ASSIGN(TrayUser); | 96 DISALLOW_COPY_AND_ASSIGN(TrayUser); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace ash | 99 } // namespace ash |
| 100 | 100 |
| 101 #endif // ASH_SYSTEM_USER_TRAY_USER_H_ | 101 #endif // ASH_SYSTEM_USER_TRAY_USER_H_ |
| OLD | NEW |