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_DATE_TRAY_DATE_H_
6 #define ASH_SYSTEM_DATE_TRAY_DATE_H_
8 #include "ash/system/date/clock_observer.h"
9 #include "ash/system/tray/system_tray_item.h"
22 class TrayDate
: public SystemTrayItem
,
23 public ClockObserver
{
29 explicit TrayDate(SystemTray
* system_tray
);
33 // Overridden from SystemTrayItem.
34 virtual views::View
* CreateTrayView(user::LoginStatus status
) OVERRIDE
;
35 virtual views::View
* CreateDefaultView(user::LoginStatus status
) OVERRIDE
;
36 virtual views::View
* CreateDetailedView(user::LoginStatus status
) OVERRIDE
;
37 virtual void DestroyTrayView() OVERRIDE
;
38 virtual void DestroyDefaultView() OVERRIDE
;
39 virtual void DestroyDetailedView() OVERRIDE
;
40 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status
) OVERRIDE
;
41 virtual void UpdateAfterShelfAlignmentChange(
42 ShelfAlignment alignment
) OVERRIDE
;
44 // Overridden from ClockObserver.
45 virtual void OnDateFormatChanged() OVERRIDE
;
46 virtual void OnSystemClockTimeUpdated() OVERRIDE
;
47 virtual void Refresh() OVERRIDE
;
49 void SetupLabelForTimeTray(views::Label
* label
);
51 tray::TimeView
* time_tray_
;
53 DISALLOW_COPY_AND_ASSIGN(TrayDate
);
56 } // namespace internal
59 #endif // ASH_SYSTEM_DATE_TRAY_DATE_H_