Searched refs:PowerMonitor (Results 1 – 9 of 9) sorted by relevance
13 static PowerMonitor* g_power_monitor = nullptr;15 PowerMonitor::PowerMonitor(std::unique_ptr<PowerMonitorSource> source) in PowerMonitor() function in base::PowerMonitor22 PowerMonitor::~PowerMonitor() { in ~PowerMonitor()29 PowerMonitor* PowerMonitor::Get() { in Get()33 void PowerMonitor::AddObserver(PowerObserver* obs) { in AddObserver()37 void PowerMonitor::RemoveObserver(PowerObserver* obs) { in RemoveObserver()41 PowerMonitorSource* PowerMonitor::Source() { in Source()45 bool PowerMonitor::IsOnBatteryPower() { in IsOnBatteryPower()49 void PowerMonitor::NotifyPowerStateChange(bool battery_in_use) { in NotifyPowerStateChange()56 void PowerMonitor::NotifySuspend() { in NotifySuspend()[all …]
20 class BASE_EXPORT PowerMonitor {23 explicit PowerMonitor(std::unique_ptr<PowerMonitorSource> source);24 ~PowerMonitor();27 static PowerMonitor* Get();51 DISALLOW_COPY_AND_ASSIGN(PowerMonitor);
21 PowerMonitor* monitor = PowerMonitor::Get(); in ProcessPowerEvent()65 DCHECK(!PowerMonitor::Get()); in SetInitialOnBatteryPowerState()
17 power_monitor_.reset(new PowerMonitor( in PowerMonitorTest()23 PowerMonitor* monitor() { return power_monitor_.get(); } in monitor()28 std::unique_ptr<PowerMonitor> power_monitor_;
16 class PowerMonitor; variable
20 public class PowerMonitor { class21 private static PowerMonitor sInstance;29 sInstance = new PowerMonitor(); in createForTests()41 sInstance = new PowerMonitor(); in create()52 PowerMonitor.onBatteryChargingChanged(intent); in create()57 private PowerMonitor() { in PowerMonitor() method in PowerMonitor
8 pub trait PowerMonitor { trait39 Send + Fn() -> std::result::Result<Box<dyn PowerMonitor>, Box<dyn Error>>44 T: Send + Fn() -> std::result::Result<Box<dyn PowerMonitor>, Box<dyn Error>>
28 std::unique_ptr<base::PowerMonitor> power_monitor( in TEST()29 new base::PowerMonitor(std::move(power_monitor_source))); in TEST()
5 use crate::{BatteryData, BatteryStatus, PowerData, PowerMonitor};104 pub fn connect() -> std::result::Result<Box<dyn PowerMonitor>, Box<dyn Error>> { in connect()133 impl PowerMonitor for DBusMonitor {