1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ash / system / power / battery_notification.h [blame]
// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_SYSTEM_POWER_BATTERY_NOTIFICATION_H_
#define ASH_SYSTEM_POWER_BATTERY_NOTIFICATION_H_
#include "ash/ash_export.h"
#include "ash/system/power/power_notification_controller.h"
#include "base/memory/raw_ptr.h"
namespace message_center {
class MessageCenter;
}
namespace ash {
// Class for showing and hiding a MessageCenter low battery notification.
class ASH_EXPORT BatteryNotification {
public:
BatteryNotification(
message_center::MessageCenter* message_center,
PowerNotificationController* power_notification_controller);
BatteryNotification(const BatteryNotification&) = delete;
BatteryNotification& operator=(const BatteryNotification&) = delete;
~BatteryNotification();
static const char kNotificationId[];
// Updates the notification if it still exists.
void Update();
private:
raw_ptr<message_center::MessageCenter> message_center_;
raw_ptr<PowerNotificationController> power_notification_controller_;
};
} // namespace ash
#endif // ASH_SYSTEM_POWER_BATTERY_NOTIFICATION_H_