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
3 // found in the LICENSE file.
5 #ifndef ASH_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_
6 #define ASH_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_
8 #include "ash/system/tray/system_tray_item.h"
17 class TrayImageItem
: public SystemTrayItem
{
19 TrayImageItem(SystemTray
* system_tray
, int resource_id
);
20 ~TrayImageItem() override
;
22 views::View
* tray_view();
24 // Changes the icon of the tray-view to the specified resource.
25 void SetImageFromResourceId(int resource_id
);
28 virtual bool GetInitialVisibility() = 0;
30 // Overridden from SystemTrayItem.
31 views::View
* CreateTrayView(user::LoginStatus status
) override
;
32 views::View
* CreateDefaultView(user::LoginStatus status
) override
;
33 views::View
* CreateDetailedView(user::LoginStatus status
) override
;
34 void DestroyTrayView() override
;
35 void DestroyDefaultView() override
;
36 void DestroyDetailedView() override
;
37 void UpdateAfterLoginStatusChange(user::LoginStatus status
) override
;
38 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment
) override
;
41 // Set the alignment of the image depending on the shelf alignment.
42 void SetItemAlignment(ShelfAlignment alignment
);
45 TrayItemView
* tray_view_
;
47 DISALLOW_COPY_AND_ASSIGN(TrayImageItem
);
52 #endif // ASH_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_