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_SYSTEM_DATE_TRAY_DATE_H_ | 5 #ifndef ASH_SYSTEM_DATE_TRAY_DATE_H_ |
6 #define ASH_SYSTEM_DATE_TRAY_DATE_H_ | 6 #define ASH_SYSTEM_DATE_TRAY_DATE_H_ |
7 | 7 |
8 #include "ash/system/date/clock_observer.h" | 8 #include "ash/system/date/clock_observer.h" |
9 #include "ash/system/tray/system_tray_item.h" | 9 #include "ash/system/tray/system_tray_item.h" |
10 | 10 |
11 namespace views { | 11 namespace views { |
12 class Label; | 12 class Label; |
13 } | 13 } |
14 | 14 |
15 namespace ash { | 15 namespace ash { |
16 namespace internal { | 16 namespace internal { |
17 | 17 |
18 namespace tray { | 18 namespace tray { |
19 class TimeView; | 19 class TimeView; |
20 } | 20 } |
21 | 21 |
22 class TrayDate : public SystemTrayItem, | 22 class TrayDate : public SystemTrayItem, |
23 public ClockObserver { | 23 public ClockObserver { |
24 public: | 24 public: |
25 enum ClockLayout { | 25 enum ClockLayout { |
26 HORIZONTAL_CLOCK, | 26 HORIZONTAL_CLOCK, |
27 VERTICAL_CLOCK, | 27 VERTICAL_CLOCK, |
28 }; | 28 }; |
29 TrayDate(); | 29 explicit TrayDate(SystemTray* system_tray); |
30 virtual ~TrayDate(); | 30 virtual ~TrayDate(); |
31 | 31 |
32 private: | 32 private: |
33 // Overridden from SystemTrayItem. | 33 // Overridden from SystemTrayItem. |
34 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; | 34 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; |
35 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; | 35 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; |
36 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; | 36 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; |
37 virtual void DestroyTrayView() OVERRIDE; | 37 virtual void DestroyTrayView() OVERRIDE; |
38 virtual void DestroyDefaultView() OVERRIDE; | 38 virtual void DestroyDefaultView() OVERRIDE; |
39 virtual void DestroyDetailedView() OVERRIDE; | 39 virtual void DestroyDetailedView() OVERRIDE; |
40 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; | 40 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; |
41 virtual void UpdateAfterShelfAlignmentChange( | 41 virtual void UpdateAfterShelfAlignmentChange( |
42 ShelfAlignment alignment) OVERRIDE; | 42 ShelfAlignment alignment) OVERRIDE; |
43 | 43 |
44 // Overridden from ClockObserver. | 44 // Overridden from ClockObserver. |
45 virtual void OnDateFormatChanged() OVERRIDE; | 45 virtual void OnDateFormatChanged() OVERRIDE; |
46 virtual void Refresh() OVERRIDE; | 46 virtual void Refresh() OVERRIDE; |
47 | 47 |
48 void SetupLabelForTimeTray(views::Label* label); | 48 void SetupLabelForTimeTray(views::Label* label); |
49 | 49 |
50 tray::TimeView* time_tray_; | 50 tray::TimeView* time_tray_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(TrayDate); | 52 DISALLOW_COPY_AND_ASSIGN(TrayDate); |
53 }; | 53 }; |
54 | 54 |
55 } // namespace internal | 55 } // namespace internal |
56 } // namespace ash | 56 } // namespace ash |
57 | 57 |
58 #endif // ASH_SYSTEM_DATE_TRAY_DATE_H_ | 58 #endif // ASH_SYSTEM_DATE_TRAY_DATE_H_ |
OLD | NEW |