battery_notification.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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
  3. // found in the LICENSE file.
  4. #ifndef ASH_SYSTEM_POWER_BATTERY_NOTIFICATION_H_
  5. #define ASH_SYSTEM_POWER_BATTERY_NOTIFICATION_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/system/power/power_notification_controller.h"
  8. namespace message_center {
  9. class MessageCenter;
  10. }
  11. namespace ash {
  12. // Class for showing and hiding a MessageCenter low battery notification.
  13. class ASH_EXPORT BatteryNotification {
  14. public:
  15. BatteryNotification(
  16. message_center::MessageCenter* message_center,
  17. PowerNotificationController::NotificationState notification_state);
  18. BatteryNotification(const BatteryNotification&) = delete;
  19. BatteryNotification& operator=(const BatteryNotification&) = delete;
  20. ~BatteryNotification();
  21. static const char kNotificationId[];
  22. // Updates the notification if it still exists.
  23. void Update(
  24. PowerNotificationController::NotificationState notification_state);
  25. private:
  26. message_center::MessageCenter* message_center_;
  27. };
  28. } // namespace ash
  29. #endif // ASH_SYSTEM_POWER_BATTERY_NOTIFICATION_H_