Lines Matching refs:self
13 def __init__(self, power_monitors):
14 super(PowerMonitorController, self).__init__()
15 self._cascading_power_monitors = power_monitors
16 self._active_monitor = None
18 def _AsyncPowerMonitor(self):
20 (x for x in self._cascading_power_monitors if x.CanMonitorPower()),
23 def CanMonitorPower(self):
24 return bool(self._AsyncPowerMonitor())
26 def StartMonitoringPower(self, browser):
27 self._active_monitor = self._AsyncPowerMonitor()
28 assert self._active_monitor, 'No available monitor.'
29 self._active_monitor.StartMonitoringPower(browser)
31 def StopMonitoringPower(self):
32 assert self._active_monitor, 'StartMonitoringPower() not called.'
34 return self._active_monitor.StopMonitoringPower()
36 self._active_monitor = None