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_POWER_TRAY_POWER_H_ | 5 #ifndef ASH_SYSTEM_POWER_TRAY_POWER_H_ |
6 #define ASH_SYSTEM_POWER_TRAY_POWER_H_ | 6 #define ASH_SYSTEM_POWER_TRAY_POWER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/system/power/power_status_observer.h" | 9 #include "ash/system/power/power_status_observer.h" |
10 #include "ash/system/tray/system_tray_item.h" | 10 #include "ash/system/tray/system_tray_item.h" |
11 | 11 |
12 class SkBitmap; | |
13 | |
14 namespace gfx { | |
15 class ImageSkia; | |
16 } | |
17 | |
12 namespace ash { | 18 namespace ash { |
13 namespace internal { | 19 namespace internal { |
14 | 20 |
15 namespace tray { | 21 namespace tray { |
16 class PowerNotificationView; | 22 class PowerNotificationView; |
17 class PowerTrayView; | 23 class PowerTrayView; |
18 } | 24 } |
19 | 25 |
26 enum IconSet { | |
27 ICON_LIGHT, | |
28 ICON_DARK | |
29 }; | |
30 | |
20 class TrayPower : public SystemTrayItem, | 31 class TrayPower : public SystemTrayItem, |
21 public PowerStatusObserver { | 32 public PowerStatusObserver { |
22 public: | 33 public: |
23 TrayPower(); | 34 TrayPower(); |
24 virtual ~TrayPower(); | 35 virtual ~TrayPower(); |
25 | 36 |
26 private: | 37 private: |
27 enum NotificationState { | 38 enum NotificationState { |
28 NOTIFICATION_NONE, | 39 NOTIFICATION_NONE, |
29 NOTIFICATION_LOW_POWER, | 40 NOTIFICATION_LOW_POWER, |
(...skipping 16 matching lines...) Expand all Loading... | |
46 // Sets |notification_state_|. Returns true if a notification should be shown. | 57 // Sets |notification_state_|. Returns true if a notification should be shown. |
47 bool UpdateNotificationState(const PowerSupplyStatus& status); | 58 bool UpdateNotificationState(const PowerSupplyStatus& status); |
48 | 59 |
49 tray::PowerTrayView* power_tray_; | 60 tray::PowerTrayView* power_tray_; |
50 tray::PowerNotificationView* notification_view_; | 61 tray::PowerNotificationView* notification_view_; |
51 NotificationState notification_state_; | 62 NotificationState notification_state_; |
52 | 63 |
53 DISALLOW_COPY_AND_ASSIGN(TrayPower); | 64 DISALLOW_COPY_AND_ASSIGN(TrayPower); |
54 }; | 65 }; |
55 | 66 |
67 gfx::ImageSkia GetBatteryImage(const PowerSupplyStatus& supply_status, | |
68 IconSet icon_set); | |
stevenjb
2012/06/07 01:31:18
nit: align
stevenjb
2012/06/07 01:31:18
Also, this would be better as a static member func
jennyz
2012/06/07 22:06:52
Done.
jennyz
2012/06/07 22:06:52
Done.
| |
69 | |
56 } // namespace internal | 70 } // namespace internal |
57 } // namespace ash | 71 } // namespace ash |
58 | 72 |
59 #endif // ASH_SYSTEM_POWER_TRAY_POWER_H_ | 73 #endif // ASH_SYSTEM_POWER_TRAY_POWER_H_ |
OLD | NEW |