#include "base/test/power_monitor_test.h"
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_source.h"
#include "base/power_monitor/power_observer.h"
#include "base/run_loop.h"
#include "base/task/current_thread.h"
namespace base {
namespace test {
class PowerMonitorTestSource : public PowerMonitorSource { … };
PowerThermalObserver::DeviceThermalState
PowerMonitorTestSource::GetCurrentThermalState() { … }
void PowerMonitorTestSource::Suspend() { … }
void PowerMonitorTestSource::Resume() { … }
void PowerMonitorTestSource::SetOnBatteryPower(bool on_battery_power) { … }
void PowerMonitorTestSource::SetBatteryPowerStatus(
PowerStateObserver::BatteryPowerStatus battery_power_status) { … }
void PowerMonitorTestSource::GeneratePowerStateEvent(bool on_battery_power) { … }
void PowerMonitorTestSource::GeneratePowerStateEvent(
PowerStateObserver::BatteryPowerStatus battery_power_status) { … }
void PowerMonitorTestSource::GenerateSuspendEvent() { … }
void PowerMonitorTestSource::GenerateResumeEvent() { … }
PowerStateObserver::BatteryPowerStatus
PowerMonitorTestSource::GetBatteryPowerStatus() { … }
bool PowerMonitorTestSource::IsOnBatteryPower() { … }
void PowerMonitorTestSource::GenerateThermalThrottlingEvent(
PowerThermalObserver::DeviceThermalState new_thermal_state) { … }
void PowerMonitorTestSource::GenerateSpeedLimitEvent(int speed_limit) { … }
ScopedPowerMonitorTestSource::ScopedPowerMonitorTestSource() { … }
ScopedPowerMonitorTestSource::~ScopedPowerMonitorTestSource() { … }
PowerThermalObserver::DeviceThermalState
ScopedPowerMonitorTestSource::GetCurrentThermalState() { … }
bool ScopedPowerMonitorTestSource::IsOnBatteryPower() { … }
PowerStateObserver::BatteryPowerStatus
ScopedPowerMonitorTestSource::GetBatteryPowerStatus() { … }
void ScopedPowerMonitorTestSource::Suspend() { … }
void ScopedPowerMonitorTestSource::Resume() { … }
void ScopedPowerMonitorTestSource::SetOnBatteryPower(bool on_battery_power) { … }
void ScopedPowerMonitorTestSource::SetBatteryPowerStatus(
PowerStateObserver::BatteryPowerStatus battery_power_status) { … }
void ScopedPowerMonitorTestSource::GenerateSuspendEvent() { … }
void ScopedPowerMonitorTestSource::GenerateResumeEvent() { … }
void ScopedPowerMonitorTestSource::GeneratePowerStateEvent(
bool on_battery_power) { … }
void ScopedPowerMonitorTestSource::GeneratePowerStateEvent(
PowerStateObserver::BatteryPowerStatus battery_power_status) { … }
void ScopedPowerMonitorTestSource::GenerateThermalThrottlingEvent(
PowerThermalObserver::DeviceThermalState new_thermal_state) { … }
void ScopedPowerMonitorTestSource::GenerateSpeedLimitEvent(int speed_limit) { … }
PowerMonitorTestObserver::PowerMonitorTestObserver() = default;
PowerMonitorTestObserver::~PowerMonitorTestObserver() = default;
void PowerMonitorTestObserver::OnBatteryPowerStatusChange(
PowerStateObserver::BatteryPowerStatus battery_power_status) { … }
void PowerMonitorTestObserver::OnPowerStateChange(bool on_power) { … }
void PowerMonitorTestObserver::OnSuspend() { … }
void PowerMonitorTestObserver::OnResume() { … }
void PowerMonitorTestObserver::OnThermalStateChange(
PowerThermalObserver::DeviceThermalState new_state) { … }
void PowerMonitorTestObserver::OnSpeedLimitChange(int speed_limit) { … }
}
}