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_MONITOR_H_ | 5 #ifndef ASH_SYSTEM_DATE_TRAY_MONITOR_H_ |
6 #define ASH_SYSTEM_DATE_TRAY_MONITOR_H_ | 6 #define ASH_SYSTEM_DATE_TRAY_MONITOR_H_ |
7 | 7 |
8 #include "ash/system/tray/system_tray_item.h" | 8 #include "ash/system/tray/system_tray_item.h" |
9 #include "base/timer.h" | 9 #include "base/timer.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 |
| 17 class SystemTray; |
| 18 |
16 namespace internal { | 19 namespace internal { |
17 | 20 |
18 class TrayMonitor : public SystemTrayItem { | 21 class TrayMonitor : public SystemTrayItem { |
19 public: | 22 public: |
20 TrayMonitor(); | 23 explicit TrayMonitor(SystemTray* system_tray); |
21 virtual ~TrayMonitor(); | 24 virtual ~TrayMonitor(); |
22 | 25 |
23 private: | 26 private: |
24 // Overridden from SystemTrayItem. | 27 // Overridden from SystemTrayItem. |
25 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; | 28 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; |
26 virtual void DestroyTrayView() OVERRIDE; | 29 virtual void DestroyTrayView() OVERRIDE; |
27 | 30 |
28 void RefreshStats(); | 31 void RefreshStats(); |
29 | 32 |
30 views::Label* label_; | 33 views::Label* label_; |
31 base::RepeatingTimer<TrayMonitor> refresh_timer_; | 34 base::RepeatingTimer<TrayMonitor> refresh_timer_; |
32 | 35 |
33 DISALLOW_COPY_AND_ASSIGN(TrayMonitor); | 36 DISALLOW_COPY_AND_ASSIGN(TrayMonitor); |
34 }; | 37 }; |
35 | 38 |
36 } // namespace internal | 39 } // namespace internal |
37 } // namespace ash | 40 } // namespace ash |
38 | 41 |
39 #endif // ASH_SYSTEM_DATE_TRAY_MONITOR_H_ | 42 #endif // ASH_SYSTEM_DATE_TRAY_MONITOR_H_ |
OLD | NEW |