tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIPowerManagerService.idl (1157B)


      1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #include "nsISupports.idl"
      7 
      8 %{C++
      9 #define POWERMANAGERSERVICE_CONTRACTID "@mozilla.org/power/powermanagerservice;1"
     10 %}
     11 
     12 interface nsIDOMMozWakeLockListener;
     13 interface mozIDOMWindow;
     14 interface nsIWakeLock;
     15 
     16 /**
     17 * For use with non-content code.
     18 */
     19 [scriptable, builtinclass, uuid(ba7ca4c1-9d92-4425-a83b-85dd7fa953f7)]
     20 interface nsIPowerManagerService : nsISupports
     21 {
     22  void              addWakeLockListener(in nsIDOMMozWakeLockListener aListener);
     23  void              removeWakeLockListener(in nsIDOMMozWakeLockListener aListener);
     24  AString           getWakeLockState(in AString aTopic);
     25 
     26  /**
     27   * Return a wake lock (MozWakeLock) object of aTopic associated with aWindow.
     28   * A wake lock without associated window, e.g. used in chrome, is
     29   * always considered invisible.
     30   */
     31  nsIWakeLock newWakeLock(in AString aTopic, [optional] in mozIDOMWindow aWindow);
     32 };