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 virtual ~TrayImageItem();
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 virtual views::View
* CreateTrayView(user::LoginStatus status
) OVERRIDE
;
32 virtual views::View
* CreateDefaultView(user::LoginStatus status
) OVERRIDE
;
33 virtual views::View
* CreateDetailedView(user::LoginStatus status
) OVERRIDE
;
34 virtual void DestroyTrayView() OVERRIDE
;
35 virtual void DestroyDefaultView() OVERRIDE
;
36 virtual void DestroyDetailedView() OVERRIDE
;
37 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status
) OVERRIDE
;
38 virtual void UpdateAfterShelfAlignmentChange(
39 ShelfAlignment alignment
) OVERRIDE
;
42 // Set the alignment of the image depending on the shelf alignment.
43 void SetItemAlignment(ShelfAlignment alignment
);
46 TrayItemView
* tray_view_
;
48 DISALLOW_COPY_AND_ASSIGN(TrayImageItem
);
53 #endif // ASH_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_