#include "services/device/battery/battery_status_service.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/no_destructor.h"
#include "base/task/single_thread_task_runner.h"
#include "base/threading/sequence_local_storage_slot.h"
#include "services/device/battery/battery_monitor_impl.h"
#include "services/device/battery/battery_status_manager.h"
namespace device {
BatteryStatusService::BatteryStatusService()
: … { … }
BatteryStatusService::~BatteryStatusService() = default;
BatteryStatusService* BatteryStatusService::GetInstance() { … }
base::CallbackListSubscription BatteryStatusService::AddCallback(
const BatteryUpdateCallback& callback) { … }
void BatteryStatusService::ConsumersChanged() { … }
void BatteryStatusService::NotifyConsumers(const mojom::BatteryStatus& status) { … }
void BatteryStatusService::NotifyConsumersOnMainThread(
const mojom::BatteryStatus& status) { … }
void BatteryStatusService::Shutdown() { … }
const BatteryStatusService::BatteryUpdateCallback&
BatteryStatusService::GetUpdateCallbackForTesting() const { … }
void BatteryStatusService::SetBatteryManagerForTesting(
std::unique_ptr<BatteryStatusManager> test_battery_manager) { … }
}