OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SYSTEM_INFO_H_ | 5 #ifndef ASH_COMMON_SYSTEM_DATE_TRAY_SYSTEM_INFO_H_ |
6 #define ASH_COMMON_SYSTEM_DATE_TRAY_SYSTEM_INFO_H_ | 6 #define ASH_COMMON_SYSTEM_DATE_TRAY_SYSTEM_INFO_H_ |
7 | 7 |
8 #if defined(OS_CHROMEOS) | |
9 #include <memory> | 8 #include <memory> |
10 #endif // defined(OS_CHROMEOS) | |
11 | 9 |
12 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
13 #include "ash/common/login_status.h" | 11 #include "ash/common/login_status.h" |
14 #include "ash/common/system/date/clock_observer.h" | 12 #include "ash/common/system/date/clock_observer.h" |
15 #include "ash/common/system/tray/system_tray_item.h" | 13 #include "ash/common/system/tray/system_tray_item.h" |
16 #include "base/macros.h" | 14 #include "base/macros.h" |
17 | 15 |
18 namespace views { | 16 namespace views { |
19 class Label; | 17 class Label; |
20 } | 18 } |
21 | 19 |
22 namespace ash { | 20 namespace ash { |
| 21 class SystemClockObserver; |
23 class SystemInfoDefaultView; | 22 class SystemInfoDefaultView; |
24 #if defined(OS_CHROMEOS) | |
25 class SystemClockObserver; | |
26 #endif | |
27 | 23 |
28 namespace tray { | 24 namespace tray { |
29 class TimeView; | 25 class TimeView; |
30 } | 26 } |
31 | 27 |
32 // The bottom row of the system menu. The default view shows the current date | 28 // The bottom row of the system menu. The default view shows the current date |
33 // and power status. The tray view shows the current time. | 29 // and power status. The tray view shows the current time. |
34 class ASH_EXPORT TraySystemInfo : public SystemTrayItem, public ClockObserver { | 30 class ASH_EXPORT TraySystemInfo : public SystemTrayItem, public ClockObserver { |
35 public: | 31 public: |
36 explicit TraySystemInfo(SystemTray* system_tray); | 32 explicit TraySystemInfo(SystemTray* system_tray); |
(...skipping 17 matching lines...) Expand all Loading... |
54 void OnSystemClockCanSetTimeChanged(bool can_set_time) override; | 50 void OnSystemClockCanSetTimeChanged(bool can_set_time) override; |
55 void Refresh() override; | 51 void Refresh() override; |
56 | 52 |
57 void SetupLabelForTimeTray(views::Label* label); | 53 void SetupLabelForTimeTray(views::Label* label); |
58 void UpdateTimeFormat(); | 54 void UpdateTimeFormat(); |
59 | 55 |
60 tray::TimeView* tray_view_; | 56 tray::TimeView* tray_view_; |
61 SystemInfoDefaultView* default_view_; | 57 SystemInfoDefaultView* default_view_; |
62 LoginStatus login_status_; | 58 LoginStatus login_status_; |
63 | 59 |
64 #if defined(OS_CHROMEOS) | |
65 std::unique_ptr<SystemClockObserver> system_clock_observer_; | 60 std::unique_ptr<SystemClockObserver> system_clock_observer_; |
66 #endif | |
67 | 61 |
68 DISALLOW_COPY_AND_ASSIGN(TraySystemInfo); | 62 DISALLOW_COPY_AND_ASSIGN(TraySystemInfo); |
69 }; | 63 }; |
70 | 64 |
71 } // namespace ash | 65 } // namespace ash |
72 | 66 |
73 #endif // ASH_COMMON_SYSTEM_DATE_TRAY_SYSTEM_INFO_H_ | 67 #endif // ASH_COMMON_SYSTEM_DATE_TRAY_SYSTEM_INFO_H_ |
OLD | NEW |