Bug 1286530 - Turn mozPower API to ChromeOnly draft
authorAlexandre Lissy <lissyx@lissyx.dyndns.org>
Fri, 22 Apr 2016 12:29:56 +0200
changeset 387254 a2fba365271c3f0a4ba62608cecdf20d43b2e536
parent 387253 5c8bc5e77b93b63e29e5758a93ce40c6f4bd5903
child 387255 eb7e18602cabad1f22a47ae78538c8d08c907109
push id22914
push userbmo:lissyx+mozillians@lissyx.dyndns.org
push dateWed, 13 Jul 2016 15:39:24 +0000
bugs1286530
milestone50.0a1
Bug 1286530 - Turn mozPower API to ChromeOnly MozReview-Commit-ID: KIYliqNH0BI
dom/webidl/MozPowerManager.webidl
dom/webidl/Navigator.webidl
--- a/dom/webidl/MozPowerManager.webidl
+++ b/dom/webidl/MozPowerManager.webidl
@@ -16,17 +16,17 @@ enum FactoryResetReason {
     "normal",
     "wipe",
     "root"
 };
 
 /**
  * This interface implements navigator.mozPower
  */
-[CheckAnyPermissions="power"]
+[ChromeOnly]
 interface MozPowerManager
 {
     [Throws]
     void    powerOff();
     [Throws]
     void    reboot();
     void    factoryReset(optional FactoryResetReason reason = "normal");
 
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -201,17 +201,17 @@ partial interface Navigator {
   // WebKit/Blink supports this (hardcoded ""); Trident/Presto do not.
   readonly attribute DOMString vendorSub;
   // WebKit/Blink supports this (hardcoded "20030107"); Trident/Presto don't
   readonly attribute DOMString productSub;
   // WebKit/Blink/Trident/Presto support this.
   readonly attribute boolean cookieEnabled;
   [Throws, Constant, Cached]
   readonly attribute DOMString buildID;
-  [Throws, CheckAnyPermissions="power", UnsafeInPrerendering]
+  [Throws, ChromeOnly, UnsafeInPrerendering]
   readonly attribute MozPowerManager mozPower;
 
   // WebKit/Blink/Trident/Presto support this.
   [Throws]
   boolean javaEnabled();
 
   /**
    * Navigator requests to add an idle observer to the existing window.