示例#1
0
  void AddObserver(BatteryObserver* aObserver) {
    if (!mObservers) {
      mObservers = new ObserverList<BatteryInformation>();
    }

    mObservers->AddObserver(aObserver);

    if (mObservers->Length() == 1) {
      PROXY_IF_SANDBOXED(EnableBatteryNotifications());
    }
  }
示例#2
0
 void EnableNotifications() {
   PROXY_IF_SANDBOXED(EnableBatteryNotifications());
 }