| 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_COMMON_SYSTEM_USER_TRAY_USER_H_ | 5 #ifndef ASH_COMMON_SYSTEM_USER_TRAY_USER_H_ |
| 6 #define ASH_COMMON_SYSTEM_USER_TRAY_USER_H_ | 6 #define ASH_COMMON_SYSTEM_USER_TRAY_USER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/session/session_types.h" | 9 #include "ash/common/session/session_types.h" |
| 10 #include "ash/common/system/tray/system_tray_item.h" | 10 #include "ash/common/system/tray/system_tray_item.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // Returns the bounds of the user panel in screen coordinates. | 53 // Returns the bounds of the user panel in screen coordinates. |
| 54 // Note: This only works when the panel shown. | 54 // Note: This only works when the panel shown. |
| 55 gfx::Rect GetUserPanelBoundsInScreenForTest() const; | 55 gfx::Rect GetUserPanelBoundsInScreenForTest() const; |
| 56 | 56 |
| 57 // Update the TrayUser as if the current LoginStatus is |status|. | 57 // Update the TrayUser as if the current LoginStatus is |status|. |
| 58 void UpdateAfterLoginStatusChangeForTest(LoginStatus status); | 58 void UpdateAfterLoginStatusChangeForTest(LoginStatus status); |
| 59 | 59 |
| 60 // Use for access inside of tests. | 60 // Use for access inside of tests. |
| 61 tray::UserView* user_view_for_test() const { return user_; } | 61 tray::UserView* user_view_for_test() const { return user_; } |
| 62 | 62 |
| 63 bool is_avatar_visible() const { return avatar_ != nullptr; } |
| 64 |
| 63 private: | 65 private: |
| 64 // Overridden from SystemTrayItem. | 66 // Overridden from SystemTrayItem. |
| 65 views::View* CreateTrayView(LoginStatus status) override; | 67 views::View* CreateTrayView(LoginStatus status) override; |
| 66 views::View* CreateDefaultView(LoginStatus status) override; | 68 views::View* CreateDefaultView(LoginStatus status) override; |
| 67 void DestroyTrayView() override; | 69 void DestroyTrayView() override; |
| 68 void DestroyDefaultView() override; | 70 void DestroyDefaultView() override; |
| 69 void UpdateAfterLoginStatusChange(LoginStatus status) override; | 71 void UpdateAfterLoginStatusChange(LoginStatus status) override; |
| 70 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; | 72 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; |
| 71 | 73 |
| 72 // Overridden from UserObserver. | 74 // Overridden from UserObserver. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 87 views::View* layout_view_; | 89 views::View* layout_view_; |
| 88 tray::RoundedImageView* avatar_; | 90 tray::RoundedImageView* avatar_; |
| 89 views::Label* label_; | 91 views::Label* label_; |
| 90 | 92 |
| 91 DISALLOW_COPY_AND_ASSIGN(TrayUser); | 93 DISALLOW_COPY_AND_ASSIGN(TrayUser); |
| 92 }; | 94 }; |
| 93 | 95 |
| 94 } // namespace ash | 96 } // namespace ash |
| 95 | 97 |
| 96 #endif // ASH_COMMON_SYSTEM_USER_TRAY_USER_H_ | 98 #endif // ASH_COMMON_SYSTEM_USER_TRAY_USER_H_ |
| OLD | NEW |