void AddObserver(BatteryObserver* aObserver) { if (!mObservers) { mObservers = new ObserverList<BatteryInformation>(); } mObservers->AddObserver(aObserver); if (mObservers->Length() == 1) { PROXY_IF_SANDBOXED(EnableBatteryNotifications()); } }
void EnableNotifications() { PROXY_IF_SANDBOXED(EnableBatteryNotifications()); }