OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CHROMEOS_POWER_BATTERY_NOTIFICATION_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_POWER_BATTERY_NOTIFICATION_H_ |
6 #define ASH_SYSTEM_CHROMEOS_POWER_BATTERY_NOTIFICATION_H_ | 6 #define ASH_SYSTEM_CHROMEOS_POWER_BATTERY_NOTIFICATION_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/system/chromeos/power/tray_power.h" | 9 #include "ash/system/chromeos/power/tray_power.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 | 11 |
13 namespace message_center { | 12 namespace message_center { |
14 class MessageCenter; | 13 class MessageCenter; |
15 } | 14 } |
16 | 15 |
17 namespace ash { | 16 namespace ash { |
18 | 17 |
19 // Class for showing and hiding a MessageCenter low battery notification. | 18 // Class for showing and hiding a MessageCenter low battery notification. |
20 class ASH_EXPORT BatteryNotification { | 19 class ASH_EXPORT BatteryNotification { |
21 public: | 20 public: |
22 BatteryNotification(message_center::MessageCenter* message_center, | 21 BatteryNotification(message_center::MessageCenter* message_center, |
23 TrayPower::NotificationState notification_state); | 22 TrayPower::NotificationState notification_state); |
24 ~BatteryNotification(); | 23 ~BatteryNotification(); |
25 | 24 |
26 // Updates the notification if it still exists. | 25 // Updates the notification if it still exists. |
27 void Update(TrayPower::NotificationState notification_state); | 26 void Update(TrayPower::NotificationState notification_state); |
28 | 27 |
29 private: | 28 private: |
30 message_center::MessageCenter* message_center_; | 29 message_center::MessageCenter* message_center_; |
31 | 30 |
32 DISALLOW_COPY_AND_ASSIGN(BatteryNotification); | 31 DISALLOW_COPY_AND_ASSIGN(BatteryNotification); |
33 }; | 32 }; |
34 | 33 |
35 } // namespace ash | 34 } // namespace ash |
36 | 35 |
37 #endif // ASH_SYSTEM_CHROMEOS_POWER_BATTERY_NOTIFICATION_H_ | 36 #endif // ASH_SYSTEM_CHROMEOS_POWER_BATTERY_NOTIFICATION_H_ |
OLD | NEW |