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_DATE_TRAY_DATE_H_ | 5 #ifndef ASH_COMMON_SYSTEM_DATE_TRAY_DATE_H_ |
6 #define ASH_COMMON_SYSTEM_DATE_TRAY_DATE_H_ | 6 #define ASH_COMMON_SYSTEM_DATE_TRAY_DATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 #include "ash/common/login_status.h" | 11 #include "ash/common/login_status.h" |
12 #include "ash/common/system/date/clock_observer.h" | 12 #include "ash/common/system/date/clock_observer.h" |
13 #include "ash/common/system/tray/system_tray_item.h" | 13 #include "ash/common/system/tray/system_tray_item.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 | 15 |
16 namespace ash { | 16 namespace ash { |
17 class DateDefaultView; | 17 class DateDefaultView; |
18 #if defined(OS_CHROMEOS) | |
19 class SystemClockObserver; | 18 class SystemClockObserver; |
20 #endif | |
21 | 19 |
22 namespace tray { | 20 namespace tray { |
23 class TimeView; | 21 class TimeView; |
24 } | 22 } |
25 | 23 |
26 // System tray item for the time and date. | 24 // System tray item for the time and date. |
27 class ASH_EXPORT TrayDate : public SystemTrayItem, public ClockObserver { | 25 class ASH_EXPORT TrayDate : public SystemTrayItem, public ClockObserver { |
28 public: | 26 public: |
29 enum ClockLayout { | 27 enum ClockLayout { |
30 HORIZONTAL_CLOCK, | 28 HORIZONTAL_CLOCK, |
(...skipping 30 matching lines...) Expand all Loading... |
61 // Overridden from ClockObserver. | 59 // Overridden from ClockObserver. |
62 void OnDateFormatChanged() override; | 60 void OnDateFormatChanged() override; |
63 void OnSystemClockTimeUpdated() override; | 61 void OnSystemClockTimeUpdated() override; |
64 void OnSystemClockCanSetTimeChanged(bool can_set_time) override; | 62 void OnSystemClockCanSetTimeChanged(bool can_set_time) override; |
65 void Refresh() override; | 63 void Refresh() override; |
66 | 64 |
67 tray::TimeView* time_tray_; | 65 tray::TimeView* time_tray_; |
68 DateDefaultView* default_view_; | 66 DateDefaultView* default_view_; |
69 LoginStatus login_status_; | 67 LoginStatus login_status_; |
70 | 68 |
71 #if defined(OS_CHROMEOS) | |
72 std::unique_ptr<SystemClockObserver> system_clock_observer_; | 69 std::unique_ptr<SystemClockObserver> system_clock_observer_; |
73 #endif | |
74 | 70 |
75 DISALLOW_COPY_AND_ASSIGN(TrayDate); | 71 DISALLOW_COPY_AND_ASSIGN(TrayDate); |
76 }; | 72 }; |
77 | 73 |
78 } // namespace ash | 74 } // namespace ash |
79 | 75 |
80 #endif // ASH_COMMON_SYSTEM_DATE_TRAY_DATE_H_ | 76 #endif // ASH_COMMON_SYSTEM_DATE_TRAY_DATE_H_ |
OLD | NEW |