| 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_TRAY_TRAY_IMAGE_ITEM_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_ |
| 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/system/tray/system_tray_item.h" | 9 #include "ash/common/system/tray/system_tray_item.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 UmaType uma_type); | 29 UmaType uma_type); |
| 30 ~TrayImageItem() override; | 30 ~TrayImageItem() override; |
| 31 | 31 |
| 32 views::View* tray_view(); | 32 views::View* tray_view(); |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 virtual bool GetInitialVisibility() = 0; | 35 virtual bool GetInitialVisibility() = 0; |
| 36 | 36 |
| 37 // Overridden from SystemTrayItem. | 37 // Overridden from SystemTrayItem. |
| 38 views::View* CreateTrayView(LoginStatus status) override; | 38 views::View* CreateTrayView(LoginStatus status) override; |
| 39 views::View* CreateDefaultView(LoginStatus status) override; | |
| 40 views::View* CreateDetailedView(LoginStatus status) override; | |
| 41 void DestroyTrayView() override; | 39 void DestroyTrayView() override; |
| 42 void DestroyDefaultView() override; | |
| 43 void DestroyDetailedView() override; | |
| 44 void UpdateAfterLoginStatusChange(LoginStatus status) override; | |
| 45 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; | |
| 46 | 40 |
| 47 // Sets the color of the icon to |color|. | 41 // Sets the color of the icon to |color|. |
| 48 void SetIconColor(SkColor color); | 42 void SetIconColor(SkColor color); |
| 49 | 43 |
| 50 private: | 44 private: |
| 51 // Sets the current icon on |tray_view_|'s ImageView. | 45 // Sets the current icon on |tray_view_|'s ImageView. |
| 52 void UpdateImageOnImageView(); | 46 void UpdateImageOnImageView(); |
| 53 | 47 |
| 54 // The icon and its current color. | 48 // The icon and its current color. |
| 55 const gfx::VectorIcon& icon_; | 49 const gfx::VectorIcon& icon_; |
| 56 SkColor icon_color_; | 50 SkColor icon_color_; |
| 57 | 51 |
| 58 // The image view in the tray. | 52 // The image view in the tray. |
| 59 TrayItemView* tray_view_; | 53 TrayItemView* tray_view_; |
| 60 | 54 |
| 61 DISALLOW_COPY_AND_ASSIGN(TrayImageItem); | 55 DISALLOW_COPY_AND_ASSIGN(TrayImageItem); |
| 62 }; | 56 }; |
| 63 | 57 |
| 64 } // namespace ash | 58 } // namespace ash |
| 65 | 59 |
| 66 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_ | 60 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_ |
| OLD | NEW |