#ifndef ASH_SYSTEM_FIRMWARE_UPDATE_FIRMWARE_UPDATE_NOTIFICATION_CONTROLLER_H_
#define ASH_SYSTEM_FIRMWARE_UPDATE_FIRMWARE_UPDATE_NOTIFICATION_CONTROLLER_H_
#include "ash/ash_export.h"
#include "base/memory/raw_ptr.h"
#include "chromeos/ash/components/fwupd/firmware_update_manager.h"
namespace message_center {
class MessageCenter;
}
namespace ash {
class ASH_EXPORT FirmwareUpdateNotificationController
: public FirmwareUpdateManager::Observer {
public:
explicit FirmwareUpdateNotificationController(
message_center::MessageCenter* message_center);
FirmwareUpdateNotificationController(
const FirmwareUpdateNotificationController&) = delete;
FirmwareUpdateNotificationController& operator=(
const FirmwareUpdateNotificationController&) = delete;
~FirmwareUpdateNotificationController() override;
void OnFirmwareUpdateReceived() override;
void NotifyFirmwareUpdateAvailable();
void set_should_show_notification_for_test(bool show_notification) {
should_show_notification_for_test_ = show_notification;
}
private:
friend class FirmwareUpdateNotificationControllerTest;
bool should_show_notification_for_test_ = false;
const raw_ptr<message_center::MessageCenter,
DanglingUntriaged | ExperimentalAsh>
message_center_;
};
}
#endif