Bug 1286530 - Turn WebIDL APIs to ChromeOnly r?bz draft
authorAlexandre Lissy <lissyx@lissyx.dyndns.org>
Wed, 20 Apr 2016 13:51:07 +0200
changeset 387672 36c8a67d0cd8607a926683e54a5342e2e94ea5f6
parent 387639 6fc4dcd66945079021324e2fb79f2f7d866fcb37
child 387673 fa466177be5b26a1d5be3475d8553ff901687de3
push id23021
push userbmo:lissyx+mozillians@lissyx.dyndns.org
push dateThu, 14 Jul 2016 13:39:30 +0000
reviewersbz
bugs1286530
milestone50.0a1
Bug 1286530 - Turn WebIDL APIs to ChromeOnly r?bz MozReview-Commit-ID: LMH1l1tt0fv
dom/network/TCPSocket.cpp
dom/webidl/AVInputPort.webidl
dom/webidl/AlarmsManager.webidl
dom/webidl/Apps.webidl
dom/webidl/AudioChannelManager.webidl
dom/webidl/BeforeAfterKeyboardEvent.webidl
dom/webidl/BluetoothAdapter.webidl
dom/webidl/BluetoothAdapterEvent.webidl
dom/webidl/BluetoothAttributeEvent.webidl
dom/webidl/BluetoothClassOfDevice.webidl
dom/webidl/BluetoothDevice.webidl
dom/webidl/BluetoothDeviceEvent.webidl
dom/webidl/BluetoothDiscoveryHandle.webidl
dom/webidl/BluetoothGatt.webidl
dom/webidl/BluetoothGattAttributeEvent.webidl
dom/webidl/BluetoothGattCharacteristic.webidl
dom/webidl/BluetoothGattCharacteristicEvent.webidl
dom/webidl/BluetoothGattDescriptor.webidl
dom/webidl/BluetoothGattServer.webidl
dom/webidl/BluetoothGattService.webidl
dom/webidl/BluetoothLeDeviceEvent.webidl
dom/webidl/BluetoothManager.webidl
dom/webidl/BluetoothMapFolderListingEvent.webidl
dom/webidl/BluetoothMapGetMessageEvent.webidl
dom/webidl/BluetoothMapMessageUpdateEvent.webidl
dom/webidl/BluetoothMapMessagesListingEvent.webidl
dom/webidl/BluetoothMapRequestHandle.webidl
dom/webidl/BluetoothMapSendMessageEvent.webidl
dom/webidl/BluetoothMapSetMessageStatusEvent.webidl
dom/webidl/BluetoothObexAuthEvent.webidl
dom/webidl/BluetoothObexAuthHandle.webidl
dom/webidl/BluetoothPairingEvent.webidl
dom/webidl/BluetoothPairingHandle.webidl
dom/webidl/BluetoothPairingListener.webidl
dom/webidl/BluetoothPbapRequestHandle.webidl
dom/webidl/BluetoothPhonebookPullingEvent.webidl
dom/webidl/BluetoothStatusChangedEvent.webidl
dom/webidl/BluetoothUUID.webidl
dom/webidl/BluetoothVCardListingEvent.webidl
dom/webidl/BluetoothVCardPullingEvent.webidl
dom/webidl/BrowserElement.webidl
dom/webidl/BrowserElementAudioChannel.webidl
dom/webidl/BrowserElementProxy.webidl
dom/webidl/ChromeNotifications.webidl
dom/webidl/Contacts.webidl
dom/webidl/DOMMobileMessageError.webidl
dom/webidl/DisplayPortInputPort.webidl
dom/webidl/DownloadEvent.webidl
dom/webidl/Downloads.webidl
dom/webidl/HDMIInputPort.webidl
dom/webidl/IccCardLockError.webidl
dom/webidl/IccChangeEvent.webidl
dom/webidl/InputMethod.webidl
dom/webidl/InputPort.webidl
dom/webidl/InputPortManager.webidl
dom/webidl/MMICall.webidl
dom/webidl/MmsMessage.webidl
dom/webidl/MobileMessageThread.webidl
dom/webidl/MozCellBroadcast.webidl
dom/webidl/MozCellBroadcastEvent.webidl
dom/webidl/MozCellBroadcastMessage.webidl
dom/webidl/MozContactChangeEvent.webidl
dom/webidl/MozIcc.webidl
dom/webidl/MozIccInfo.webidl
dom/webidl/MozIccManager.webidl
dom/webidl/MozIsoDepTech.webidl
dom/webidl/MozMessageDeletedEvent.webidl
dom/webidl/MozMmsEvent.webidl
dom/webidl/MozMobileConnection.webidl
dom/webidl/MozMobileMessageManager.webidl
dom/webidl/MozNFC.webidl
dom/webidl/MozNFCPeer.webidl
dom/webidl/MozNFCPeerEvent.webidl
dom/webidl/MozNFCTag.webidl
dom/webidl/MozNFCTagEvent.webidl
dom/webidl/MozNetworkStats.webidl
dom/webidl/MozNetworkStatsAlarm.webidl
dom/webidl/MozNetworkStatsData.webidl
dom/webidl/MozNetworkStatsInterface.webidl
dom/webidl/MozNetworkStatsManager.webidl
dom/webidl/MozNfcATech.webidl
dom/webidl/MozPowerManager.webidl
dom/webidl/MozSettingsEvent.webidl
dom/webidl/MozSettingsTransactionEvent.webidl
dom/webidl/MozSmsEvent.webidl
dom/webidl/MozStkCommandEvent.webidl
dom/webidl/MozTetheringManager.webidl
dom/webidl/MozVoicemail.webidl
dom/webidl/MozVoicemailEvent.webidl
dom/webidl/MozVoicemailStatus.webidl
dom/webidl/Navigator.webidl
dom/webidl/PermissionSettings.webidl
dom/webidl/PhoneNumberService.webidl
dom/webidl/PresentationDeviceInfoManager.webidl
dom/webidl/PresentationRequest.webidl
dom/webidl/ResourceStats.webidl
dom/webidl/ResourceStatsManager.webidl
dom/webidl/SecureElement.webidl
dom/webidl/SecureElementManager.webidl
dom/webidl/SettingsManager.webidl
dom/webidl/SimplePushManager.webidl
dom/webidl/SmsMessage.webidl
dom/webidl/SystemUpdate.webidl
dom/webidl/TCPSocketErrorEvent.webidl
dom/webidl/TVChannel.webidl
dom/webidl/TVCurrentChannelChangedEvent.webidl
dom/webidl/TVCurrentSourceChangedEvent.webidl
dom/webidl/TVEITBroadcastedEvent.webidl
dom/webidl/TVManager.webidl
dom/webidl/TVProgram.webidl
dom/webidl/TVScanningStateChangedEvent.webidl
dom/webidl/TVSource.webidl
dom/webidl/TVTuner.webidl
dom/webidl/Telephony.webidl
dom/webidl/UDPMessageEvent.webidl
dom/webidl/UDPSocket.webidl
dom/webidl/USSDReceivedEvent.webidl
dom/webidl/USSDSession.webidl
--- a/dom/network/TCPSocket.cpp
+++ b/dom/network/TCPSocket.cpp
@@ -1230,16 +1230,10 @@ TCPSocket::Observe(nsISupports* aSubject
   return NS_OK;
 }
 
 /* static */
 bool
 TCPSocket::ShouldTCPSocketExist(JSContext* aCx, JSObject* aGlobal)
 {
   JS::Rooted<JSObject*> global(aCx, aGlobal);
-  if (nsContentUtils::IsSystemPrincipal(nsContentUtils::ObjectPrincipal(global))) {
-    return true;
-  }
-
-  const char* const perms[] = { "tcp-socket", nullptr };
-  return Preferences::GetBool("dom.mozTCPSocket.enabled") &&
-      CheckAnyPermissions(aCx, global, perms);
+  return nsContentUtils::IsSystemPrincipal(nsContentUtils::ObjectPrincipal(global));
 }
--- a/dom/webidl/AVInputPort.webidl
+++ b/dom/webidl/AVInputPort.webidl
@@ -1,9 +1,9 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+[Pref="dom.inputport.enabled", ChromeOnly]
  interface AVInputPort : InputPort {
  };
--- a/dom/webidl/AlarmsManager.webidl
+++ b/dom/webidl/AlarmsManager.webidl
@@ -3,17 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * https://wiki.mozilla.org/WebAPI/AlarmAPI
  */
 
 [NavigatorProperty="mozAlarms",
  JSImplementation="@mozilla.org/alarmsManager;1",
- CheckAnyPermissions="alarms",
- Pref="dom.mozAlarms.enabled"]
+ Pref="dom.mozAlarms.enabled",
+ ChromeOnly]
 interface AlarmsManager {
   DOMRequest getAll();
   [UnsafeInPrerendering]
   DOMRequest add(any date, DOMString respectTimezone, optional any data);
   [UnsafeInPrerendering]
   void remove(unsigned long id);
 };
--- a/dom/webidl/Apps.webidl
+++ b/dom/webidl/Apps.webidl
@@ -17,19 +17,19 @@ dictionary LanguageDesc {
 
 enum LocaleResourceType {
   "binary",
   "json",
   "text"
 };
 
 [NoInterfaceObject, NavigatorProperty="mozApps",
- JSImplementation="@mozilla.org/webapps;1"]
+ JSImplementation="@mozilla.org/webapps;1",
+ ChromeOnly]
 interface DOMApplicationsRegistry {
-  [CheckAnyPermissions="webapps-manage homescreen-webapps-manage"]
   readonly attribute DOMApplicationsManager mgmt;
   DOMRequest install(DOMString url, optional InstallParameters params);
   DOMRequest installPackage(DOMString url, optional InstallParameters params);
   DOMRequest getSelf();
   DOMRequest getInstalled();
   DOMRequest checkInstalled(DOMString manifestUrl);
 
   // Language pack API.
@@ -100,31 +100,26 @@ interface DOMApplication : EventTarget {
   // Returns the localized value of a property, using either the manifest or
   // a langpack if one is available.
   Promise<DOMString> getLocalizedValue(DOMString property,
                                        DOMString locale,
                                        optional DOMString entryPoint);
 };
 
 [JSImplementation="@mozilla.org/webapps/manager;1",
- ChromeOnly,
- CheckAnyPermissions="webapps-manage homescreen-webapps-manage"]
+ ChromeOnly]
 interface DOMApplicationsManager : EventTarget {
   DOMRequest getAll();
 
-  [CheckAnyPermissions="webapps-manage"]
   void applyDownload(DOMApplication app);
   DOMRequest uninstall(DOMApplication app);
 
-  [CheckAnyPermissions="webapps-manage"]
   Promise<DOMApplication> import(Blob blob);
-  [CheckAnyPermissions="webapps-manage"]
   Promise<any> extractManifest(Blob blob);
 
-  [CheckAnyPermissions="webapps-manage"]
   void setEnabled(DOMApplication app, boolean state);
   Promise<Blob> getIcon(DOMApplication app, DOMString iconID,
                         optional DOMString entryPoint);
 
   attribute EventHandler oninstall;
   attribute EventHandler onuninstall;
   attribute EventHandler onenabledstatechange;
 };
--- a/dom/webidl/AudioChannelManager.webidl
+++ b/dom/webidl/AudioChannelManager.webidl
@@ -27,11 +27,11 @@ interface AudioChannelManager : EventTar
   /**
    * Indicates which audio channel is used to adjust volume when pressing HW
    * volume keys.
    */
   attribute DOMString volumeControlChannel;
 
   [Pure, Cached, Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="system-app-only-audio-channels-in-app"]
+   ChromeOnly]
   readonly attribute sequence<BrowserElementAudioChannel> allowedAudioChannels;
 };
--- a/dom/webidl/BeforeAfterKeyboardEvent.webidl
+++ b/dom/webidl/BeforeAfterKeyboardEvent.webidl
@@ -1,18 +1,18 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString typeArg,
  optional BeforeAfterKeyboardEventInit eventInitDict),
- CheckAnyPermissions="embed-apps before-after-keyboard-event",
- Pref="dom.beforeAfterKeyboardEvent.enabled"]
+ Pref="dom.beforeAfterKeyboardEvent.enabled",
+ ChromeOnly]
 interface BeforeAfterKeyboardEvent : KeyboardEvent
 {
   // The valid value of embeddedCancelled is:
   // - "mozbrowserbeforekeydown": null
   // - "mozbrowserbeforekeyup": null
   // - "mozbrowserafterkeydown": true/false
   // - "mozbrowserafterkeyup": true/false
   readonly attribute boolean? embeddedCancelled;
--- a/dom/webidl/BluetoothAdapter.webidl
+++ b/dom/webidl/BluetoothAdapter.webidl
@@ -27,27 +27,25 @@ dictionary MediaPlayStatus
   // current track length (ms)
   long long   duration = -1;
   // playing time (ms)
   long long   position = -1;
   // one of 'STOPPED'/'PLAYING'/'PAUSED'/'FWD_SEEK'/'REV_SEEK'/'ERROR'
   DOMString   playStatus = "";
 };
 
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothAdapter : EventTarget {
   readonly attribute BluetoothAdapterState  state;
-  [AvailableIn=CertifiedApps]
   readonly attribute DOMString              address;
   readonly attribute DOMString              name;
   readonly attribute boolean                discoverable;
   readonly attribute boolean                discovering;
   readonly attribute BluetoothGattServer?   gattServer;
 
-  [AvailableIn=CertifiedApps]
   readonly attribute BluetoothPairingListener? pairingReqs;
 
   // Fired when attribute(s) of BluetoothAdapter changed
            attribute EventHandler   onattributechanged;
 
   // Fired when a remote device gets paired with the adapter
            attribute EventHandler   ondevicepaired;
 
@@ -104,22 +102,22 @@ interface BluetoothAdapter : EventTarget
 
   /**
    * Enable/Disable a local bluetooth adapter by asynchronus methods and return
    * its result through a Promise.
    *
    * Several onattributechanged events would be triggered during processing the
    * request, and the last one indicates adapter.state becomes enabled/disabled.
    */
-  [NewObject, AvailableIn=CertifiedApps]
+  [NewObject]
   Promise<void> enable();
-  [NewObject, AvailableIn=CertifiedApps]
+  [NewObject]
   Promise<void> disable();
 
-  [NewObject, AvailableIn=CertifiedApps]
+  [NewObject]
   Promise<void> setName(DOMString name);
   [NewObject]
   Promise<void> setDiscoverable(boolean discoverable);
 
   [NewObject]
   Promise<BluetoothDiscoveryHandle> startDiscovery();
   [NewObject]
   Promise<void> stopDiscovery();
@@ -139,17 +137,17 @@ interface BluetoothAdapter : EventTarget
   [NewObject,
    Func="mozilla::dom::bluetooth::BluetoothManager::B2GGattClientEnabled"]
   Promise<BluetoothDiscoveryHandle> startLeScan(sequence<DOMString> serviceUuids);
 
   [NewObject,
    Func="mozilla::dom::bluetooth::BluetoothManager::B2GGattClientEnabled"]
   Promise<void> stopLeScan(BluetoothDiscoveryHandle discoveryHandle);
 
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest getConnectedDevices(unsigned short serviceUuid);
 
   /**
    * Connect/Disconnect to a specific service of a target remote device.
    * To check the value of service UUIDs, please check "Bluetooth Assigned
    * Numbers" / "Service Discovery Protocol" for more information.
    *
    * Note that service UUID is optional. If it isn't passed when calling
@@ -159,59 +157,59 @@ interface BluetoothAdapter : EventTarget
    *
    * Reply success if the connection of any profile is successfully
    * established/released; reply error if we failed to connect/disconnect all
    * of the planned profiles.
    *
    * @param device Remote device
    * @param profile 2-octets service UUID. This is optional.
    */
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest connect(BluetoothDevice device, optional unsigned short serviceUuid);
 
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest disconnect(BluetoothDevice device, optional unsigned short serviceUuid);
 
   // One device can only send one file at a time
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest sendFile(DOMString deviceAddress, Blob blob);
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest stopSendingFile(DOMString deviceAddress);
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest confirmReceivingFile(DOMString deviceAddress, boolean confirmation);
 
   // Connect/Disconnect SCO (audio) connection
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest connectSco();
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest disconnectSco();
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest isScoConnected();
 
   /**
    * Additional HFP methods to handle CDMA network.
    *
    * In GSM network we observe call operations from RIL call state changes;
    * however in CDMA network RIL call states do not change under some call
    * operations, so we need these additional methods to be informed of these
    * operations from dialer.
    *
    * For more information please refer to bug 912005 and 925638.
    */
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest answerWaitingCall();
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest ignoreWaitingCall();
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest toggleCalls();
 
   // AVRCP 1.3 methods
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest sendMediaMetaData(optional MediaMetaData mediaMetaData);
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest sendMediaPlayStatus(optional MediaPlayStatus mediaPlayStatus);
 };
 
 enum BluetoothAdapterState
 {
   "disabled",
   "disabling",
   "enabled",
--- a/dom/webidl/BluetoothAdapterEvent.webidl
+++ b/dom/webidl/BluetoothAdapterEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type, optional BluetoothAdapterEventInit eventInitDict)]
 interface BluetoothAdapterEvent : Event
 {
   readonly attribute BluetoothAdapter? adapter;
   readonly attribute DOMString?        address;
 };
 
 dictionary BluetoothAdapterEventInit : EventInit
--- a/dom/webidl/BluetoothAttributeEvent.webidl
+++ b/dom/webidl/BluetoothAttributeEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothAttributeEventInit eventInitDict)]
 interface BluetoothAttributeEvent : Event
 {
   [Cached, Constant]
   readonly attribute sequence<DOMString> attrs;
 };
 
--- a/dom/webidl/BluetoothClassOfDevice.webidl
+++ b/dom/webidl/BluetoothClassOfDevice.webidl
@@ -1,14 +1,14 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothClassOfDevice
 {
   /**
    * The following constants are defined in Assigned Numbers of bluetooth
    * General Access Profile (GAP) spec. For more information see
    *   https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband
    */
 
--- a/dom/webidl/BluetoothDevice.webidl
+++ b/dom/webidl/BluetoothDevice.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothDevice : EventTarget
 {
   readonly attribute DOMString              address;
   readonly attribute BluetoothClassOfDevice cod;
   readonly attribute DOMString              name;
   readonly attribute boolean                paired;
   readonly attribute BluetoothDeviceType    type;
 
--- a/dom/webidl/BluetoothDeviceEvent.webidl
+++ b/dom/webidl/BluetoothDeviceEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type, optional BluetoothDeviceEventInit eventInitDict)]
 interface BluetoothDeviceEvent : Event
 {
   readonly attribute BluetoothDevice? device;
   readonly attribute DOMString?       address;
 };
 
 dictionary BluetoothDeviceEventInit : EventInit
--- a/dom/webidl/BluetoothDiscoveryHandle.webidl
+++ b/dom/webidl/BluetoothDiscoveryHandle.webidl
@@ -1,9 +1,9 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothDiscoveryHandle : EventTarget {
   attribute EventHandler ondevicefound;
 };
--- a/dom/webidl/BluetoothGatt.webidl
+++ b/dom/webidl/BluetoothGatt.webidl
@@ -4,17 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * [B2G only GATT client API]
  * BluetoothGatt interface is exposed only if
  * "dom.bluetooth.webbluetooth.enabled" preference is false.
  */
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Func="mozilla::dom::bluetooth::BluetoothManager::B2GGattClientEnabled"]
 interface BluetoothGatt : EventTarget
 {
   [Cached, Pure]
   readonly attribute sequence<BluetoothGattService> services;
   readonly attribute BluetoothConnectionState       connectionState;
 
   // Fired when the value of any characteristic changed
--- a/dom/webidl/BluetoothGattAttributeEvent.webidl
+++ b/dom/webidl/BluetoothGattAttributeEvent.webidl
@@ -1,17 +1,17 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString type,
              optional BluetoothGattAttributeEventInit eventInitDict),
- CheckAnyPermissions="bluetooth"]
+ ChromeOnly]
 interface BluetoothGattAttributeEvent : Event
 {
   readonly attribute DOMString                    address;
   readonly attribute long                         requestId;
   readonly attribute BluetoothGattCharacteristic? characteristic;
   readonly attribute BluetoothGattDescriptor?     descriptor;
   [Throws]
   readonly attribute ArrayBuffer?                 value;
--- a/dom/webidl/BluetoothGattCharacteristic.webidl
+++ b/dom/webidl/BluetoothGattCharacteristic.webidl
@@ -28,17 +28,17 @@ dictionary GattPermissions
   boolean writeSignedMITM = false;
 };
 
 /**
  * BluetoothGattCharacteristic could be in the server role as a characteristic
  * provided by a local GATT server, or in the client role as a characteristic
  * provided by a remote GATT server.
  */
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothGattCharacteristic
 {
   readonly attribute BluetoothGattService                   service;
   [Cached, Pure]
   readonly attribute sequence<BluetoothGattDescriptor>      descriptors;
 
   readonly attribute DOMString                              uuid;
   readonly attribute unsigned short                         instanceId;
--- a/dom/webidl/BluetoothGattCharacteristicEvent.webidl
+++ b/dom/webidl/BluetoothGattCharacteristicEvent.webidl
@@ -4,17 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 /**
  * [B2G only GATT client API]
  * BluetoothGattCharacteristicEvent interface is exposed only if
  * "dom.bluetooth.webbluetooth.enabled" preference is false.
  */
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Func="mozilla::dom::bluetooth::BluetoothManager::B2GGattClientEnabled",
  Constructor(DOMString type,
              optional BluetoothGattCharacteristicEventInit eventInitDict)]
 interface BluetoothGattCharacteristicEvent : Event
 {
   readonly attribute BluetoothGattCharacteristic? characteristic;
 };
 
--- a/dom/webidl/BluetoothGattDescriptor.webidl
+++ b/dom/webidl/BluetoothGattDescriptor.webidl
@@ -4,17 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * BluetoothGattDescriptor could be in the server role as a descriptor provided
  * by a local GATT server, or in the client role as a descriptor provided by a
  * remote GATT server.
  */
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothGattDescriptor
 {
   readonly attribute BluetoothGattCharacteristic            characteristic;
   readonly attribute DOMString                              uuid;
   readonly attribute ArrayBuffer?                           value;
   [Cached, Constant]
   readonly attribute GattPermissions                        permissions;
 
--- a/dom/webidl/BluetoothGattServer.webidl
+++ b/dom/webidl/BluetoothGattServer.webidl
@@ -61,17 +61,17 @@ dictionary BluetoothAdvertisingData
 
   /**
    * A list of Service or Service Class UUIDs.
    * Please see Core Specification Supplement (CSS) v6 1.1 for more details.
    */
   sequence<DOMString> serviceUuids = [];
 };
 
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothGattServer : EventTarget
 {
   [Cached, Pure]
   readonly attribute sequence<BluetoothGattService> services;
 
   // Fired when a remote device has been connected/disconnected
   attribute EventHandler  onconnectionstatechanged;
 
--- a/dom/webidl/BluetoothGattService.webidl
+++ b/dom/webidl/BluetoothGattService.webidl
@@ -4,17 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * BluetoothGattService could be in the server role as a service provided by a
  * local GATT server, or in the client role as a service provided by a remote
  * GATT server.
  */
-[CheckAnyPermissions="bluetooth", Constructor(BluetoothGattServiceInit init)]
+[ChromeOnly, Constructor(BluetoothGattServiceInit init)]
 interface BluetoothGattService
 {
   [Cached, Pure]
   readonly attribute sequence<BluetoothGattCharacteristic>  characteristics;
   [Cached, Pure]
   readonly attribute sequence<BluetoothGattService>         includedServices;
 
   readonly attribute boolean                                isPrimary;
@@ -46,9 +46,9 @@ interface BluetoothGattService
   [NewObject]
   Promise<void> addIncludedService(BluetoothGattService service);
 };
 
 dictionary BluetoothGattServiceInit
 {
   boolean isPrimary = false;
   DOMString uuid = "";
-};
\ No newline at end of file
+};
--- a/dom/webidl/BluetoothLeDeviceEvent.webidl
+++ b/dom/webidl/BluetoothLeDeviceEvent.webidl
@@ -4,17 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 /**
  * [B2G only GATT client API]
  * BluetoothLeDeviceEvent interface is exposed only if
  * "dom.bluetooth.webbluetooth.enabled" preference is false.
  */
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Func="mozilla::dom::bluetooth::BluetoothManager::B2GGattClientEnabled",
  Constructor(DOMString type, optional BluetoothLeDeviceEventInit eventInitDict)]
 interface BluetoothLeDeviceEvent : Event
 {
   readonly attribute BluetoothDevice? device;
   readonly attribute short rssi;
   [Throws]
   readonly attribute ArrayBuffer? scanRecord;
--- a/dom/webidl/BluetoothManager.webidl
+++ b/dom/webidl/BluetoothManager.webidl
@@ -1,14 +1,14 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothManager: EventTarget
 {
   readonly attribute BluetoothAdapter? defaultAdapter;
 
   // Fired when attribute(s) of BluetoothManager changed
            attribute EventHandler onattributechanged;
 
   // Fired when a new adapter is plugged in
--- a/dom/webidl/BluetoothMapFolderListingEvent.webidl
+++ b/dom/webidl/BluetoothMapFolderListingEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothMapFolderListingEventInit eventInitDict)]
 interface BluetoothMapFolderListingEvent : Event
 {
   readonly attribute unsigned long              maxListCount;
   readonly attribute unsigned long              listStartOffset;
 
   readonly attribute BluetoothMapRequestHandle? handle;
--- a/dom/webidl/BluetoothMapGetMessageEvent.webidl
+++ b/dom/webidl/BluetoothMapGetMessageEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothMapGetMessageEventInit eventInitDict)]
 interface BluetoothMapGetMessageEvent : Event
 {
   readonly attribute boolean          hasAttachment;
   readonly attribute FilterCharset    charset;
 
   readonly attribute BluetoothMapRequestHandle? handle;
--- a/dom/webidl/BluetoothMapMessageUpdateEvent.webidl
+++ b/dom/webidl/BluetoothMapMessageUpdateEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothMapMessageUpdateEventInit eventInitDict)]
 interface BluetoothMapMessageUpdateEvent : Event
 {
   readonly attribute unsigned long         instanceId;
 
   readonly attribute BluetoothMapRequestHandle? handle;
 };
--- a/dom/webidl/BluetoothMapMessagesListingEvent.webidl
+++ b/dom/webidl/BluetoothMapMessagesListingEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothMapMessagesListingEventInit eventInitDict)]
 interface BluetoothMapMessagesListingEvent : Event
 {
   readonly attribute unsigned long              maxListCount;
   readonly attribute unsigned long              listStartOffset;
   readonly attribute unsigned long              subjectLength;
   [Cached, Constant]
--- a/dom/webidl/BluetoothMapRequestHandle.webidl
+++ b/dom/webidl/BluetoothMapRequestHandle.webidl
@@ -1,55 +1,55 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothMapRequestHandle
 {
   /**
    * Reply to Folder-Listing object for MAP request. The Promise will be
    * rejected if the MAP request operation fails.
    */
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   Promise<void> replyToFolderListing(long masId, DOMString folders);
 
   /**
    * Reply the Messages-Listing object to the MAP request. The Promise will
    * be rejected if the MAP request operation fails.
    */
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   Promise<void> replyToMessagesListing(
     long masId,
     Blob messageslisting,
     boolean newmessage,
     DOMString timestamp,
     unsigned long size);
 
   /**
    * Reply GetMessage object to the MAP request. The Promise will be rejected
    * if the MAP request operation fails.
    */
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   Promise<void> replyToGetMessage(long masId, Blob bmessage);
 
   /**
    * Reply SetMessage object to the MAP request. The Promise will be rejected
    * if the MAP request operation fails.
    */
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   Promise<void> replyToSetMessageStatus(long masId, boolean status);
 
   /**
    * Reply SendMessage request to the MAP request. The Promise will be rejected
    * if the MAP request operation fails.
    */
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   Promise<void> replyToSendMessage(long masId, DOMString handleId, boolean status);
 
   /**
    * Reply Message-Update object to the MAP request. The Promise will be
    * rejected if the MAP request operation fails.
    */
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   Promise<void> replyToMessageUpdate(long masId, boolean status);
 };
--- a/dom/webidl/BluetoothMapSendMessageEvent.webidl
+++ b/dom/webidl/BluetoothMapSendMessageEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothMapSendMessageEventInit eventInitDict)]
 interface BluetoothMapSendMessageEvent : Event
 {
   readonly attribute DOMString        recipient;
   readonly attribute DOMString        messageBody;
   readonly attribute unsigned long    retry;
 
--- a/dom/webidl/BluetoothMapSetMessageStatusEvent.webidl
+++ b/dom/webidl/BluetoothMapSetMessageStatusEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothMapSetMessageStatusEventInit eventInitDict)]
 interface BluetoothMapSetMessageStatusEvent : Event
 {
   readonly attribute unsigned long     handleId;
   readonly attribute StatusIndicators  statusIndicator;
   readonly attribute boolean           statusValue;
 
--- a/dom/webidl/BluetoothObexAuthEvent.webidl
+++ b/dom/webidl/BluetoothObexAuthEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothObexAuthEventInit eventInitDict)]
 interface BluetoothObexAuthEvent : Event
 {
   readonly attribute DOMString?               userId;
   readonly attribute BluetoothObexAuthHandle? handle;
 };
 
--- a/dom/webidl/BluetoothObexAuthHandle.webidl
+++ b/dom/webidl/BluetoothObexAuthHandle.webidl
@@ -1,14 +1,14 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothObexAuthHandle
 {
   /**
    * Reply password for obexpasswordreq. The promise will be rejected if the
    * operation fails.
    */
   [NewObject]
   Promise<void> setPassword(DOMString aPassword);
--- a/dom/webidl/BluetoothPairingEvent.webidl
+++ b/dom/webidl/BluetoothPairingEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothPairingEventInit eventInitDict)]
 interface BluetoothPairingEvent : Event
 {
   readonly attribute DOMString               deviceName;
   readonly attribute BluetoothPairingHandle? handle;
 };
 
--- a/dom/webidl/BluetoothPairingHandle.webidl
+++ b/dom/webidl/BluetoothPairingHandle.webidl
@@ -1,14 +1,14 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothPairingHandle
 {
   /**
    * A 6-digit string ranging from decimal 000000 to 999999.
    * This attribute is an empty string for enterpincodereq and
    * pairingconsentreq.
    */
   readonly attribute DOMString passkey;
--- a/dom/webidl/BluetoothPairingListener.webidl
+++ b/dom/webidl/BluetoothPairingListener.webidl
@@ -1,13 +1,13 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[AvailableIn=CertifiedApps, CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothPairingListener: EventTarget
 {
   attribute EventHandler ondisplaypasskeyreq;
   attribute EventHandler onenterpincodereq;
   attribute EventHandler onpairingconfirmationreq;
   attribute EventHandler onpairingconsentreq;
 };
--- a/dom/webidl/BluetoothPbapRequestHandle.webidl
+++ b/dom/webidl/BluetoothPbapRequestHandle.webidl
@@ -1,33 +1,33 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[CheckAnyPermissions="bluetooth"]
+[ChromeOnly]
 interface BluetoothPbapRequestHandle
 {
   /**
    * Reply vCard object to the PBAP request. The DOMRequest will get onerror
    * callback if the PBAP request type is not 'pullvcardentryreq' or operation
    * fails.
    */
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest replyTovCardPulling(Blob vcardObject);
 
   /**
    * Reply vCard object to the PBAP request. The DOMRequest will get onerror
    * callback if the PBAP request type is not 'pullphonebookreq' or operation
    * fails.
    */
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest replyToPhonebookPulling(Blob vcardObject,
                                      unsigned long long phonebookSize);
   /**
    * Reply vCard object to the PBAP request. The DOMRequest will get onerror
    * callback if the PBAP request type is not 'pullvcardlistingreq' or operation
    * fails.
    */
-  [NewObject, Throws, AvailableIn=CertifiedApps]
+  [NewObject, Throws]
   DOMRequest replyTovCardListing(Blob vcardObject,
                                  unsigned long long phonebookSize);
 };
--- a/dom/webidl/BluetoothPhonebookPullingEvent.webidl
+++ b/dom/webidl/BluetoothPhonebookPullingEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothPhonebookPullingEventInit eventInitDict)]
 interface BluetoothPhonebookPullingEvent : Event
 {
   readonly attribute DOMString                  name;
   readonly attribute vCardVersion               format;
   [Cached, Constant]
   readonly attribute sequence<vCardProperties>  propSelector;
--- a/dom/webidl/BluetoothStatusChangedEvent.webidl
+++ b/dom/webidl/BluetoothStatusChangedEvent.webidl
@@ -1,17 +1,17 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString type,
              optional BluetoothStatusChangedEventInit eventInitDict),
- CheckAnyPermissions="bluetooth"]
+ ChromeOnly]
 interface BluetoothStatusChangedEvent : Event
 {
   readonly attribute DOMString address;
   readonly attribute boolean status;
 };
 
 dictionary BluetoothStatusChangedEventInit : EventInit
 {
--- a/dom/webidl/BluetoothUUID.webidl
+++ b/dom/webidl/BluetoothUUID.webidl
@@ -8,17 +8,17 @@
  *
  */
 
 typedef DOMString UUID;
 typedef (DOMString or unsigned long) BluetoothServiceUUID;
 typedef (DOMString or unsigned long) BluetoothCharacteristicUUID;
 typedef (DOMString or unsigned long) BluetoothDescriptorUUID;
 
-[Pref="dom.bluetooth.webbluetooth.enable", CheckAnyPermissions="bluetooth"]
+[Pref="dom.bluetooth.webbluetooth.enable", ChromeOnly]
 interface BluetoothUUID
 {
   [Throws]
   static UUID getService(BluetoothServiceUUID name);
   [Throws]
   static UUID getCharacteristic(BluetoothCharacteristicUUID name);
   [Throws]
   static UUID getDescriptor(BluetoothDescriptorUUID name);
--- a/dom/webidl/BluetoothVCardListingEvent.webidl
+++ b/dom/webidl/BluetoothVCardListingEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothVCardListingEventInit eventInitDict)]
 interface BluetoothVCardListingEvent : Event
 {
   readonly attribute DOMString                 name;
   readonly attribute vCardOrderType            order;
   readonly attribute DOMString                 searchValue;
   readonly attribute vCardSearchKeyType        searchKey;
--- a/dom/webidl/BluetoothVCardPullingEvent.webidl
+++ b/dom/webidl/BluetoothVCardPullingEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="bluetooth",
+[ChromeOnly,
  Constructor(DOMString type,
              optional BluetoothVCardPullingEventInit eventInitDict)]
 interface BluetoothVCardPullingEvent : Event
 {
   readonly attribute DOMString                 name;
   readonly attribute vCardVersion              format;
   [Cached, Constant]
   readonly attribute sequence<vCardProperties> propSelector;
--- a/dom/webidl/BrowserElement.webidl
+++ b/dom/webidl/BrowserElement.webidl
@@ -25,159 +25,159 @@ interface BrowserElement {
 
 BrowserElement implements BrowserElementCommon;
 BrowserElement implements BrowserElementPrivileged;
 
 [NoInterfaceObject]
 interface BrowserElementCommon {
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser embed-widgets"]
+   ChromeOnly]
   void setVisible(boolean visible);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser embed-widgets"]
+   ChromeOnly]
   DOMRequest getVisible();
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser embed-widgets"]
+   ChromeOnly]
   void setActive(boolean active);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser embed-widgets"]
+   ChromeOnly]
   boolean getActive();
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser embed-widgets"]
+   ChromeOnly]
   void addNextPaintListener(BrowserElementNextPaintEventCallback listener);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser embed-widgets"]
+   ChromeOnly]
   void removeNextPaintListener(BrowserElementNextPaintEventCallback listener);
 };
 
 [NoInterfaceObject]
 interface BrowserElementPrivileged {
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void sendMouseEvent(DOMString type,
                       unsigned long x,
                       unsigned long y,
                       unsigned long button,
                       unsigned long clickCount,
                       unsigned long modifiers);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
    Func="TouchEvent::PrefEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void sendTouchEvent(DOMString type,
                       sequence<unsigned long> identifiers,
                       sequence<long> x,
                       sequence<long> y,
                       sequence<unsigned long> rx,
                       sequence<unsigned long> ry,
                       sequence<float> rotationAngles,
                       sequence<float> forces,
                       unsigned long count,
                       unsigned long modifiers);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void goBack();
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void goForward();
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void reload(optional boolean hardReload = false);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void stop();
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   DOMRequest download(DOMString url,
                       optional BrowserElementDownloadOptions options);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   DOMRequest purgeHistory();
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   DOMRequest getScreenshot([EnforceRange] unsigned long width,
                            [EnforceRange] unsigned long height,
                            optional DOMString mimeType="");
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void zoom(float zoom);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   DOMRequest getCanGoBack();
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   DOMRequest getCanGoForward();
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   DOMRequest getContentDimensions();
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAllPermissions="browser input-manage"]
+   ChromeOnly]
   DOMRequest setInputMethodActive(boolean isActive);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAllPermissions="browser nfc-manager"]
+   ChromeOnly]
   void setNFCFocus(boolean isFocus);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void findAll(DOMString searchString, BrowserFindCaseSensitivity caseSensitivity);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void findNext(BrowserFindDirection direction);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void clearMatch();
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAllPermissions="browser browser:universalxss"]
+   ChromeOnly]
   DOMRequest executeScript(DOMString script,
                            optional BrowserElementExecuteScriptOptions options);
 
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAllPermissions="browser"]
+   ChromeOnly]
   DOMRequest getWebManifest();
 
 };
--- a/dom/webidl/BrowserElementAudioChannel.webidl
+++ b/dom/webidl/BrowserElementAudioChannel.webidl
@@ -1,16 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser"]
+ ChromeOnly]
 interface BrowserElementAudioChannel : EventTarget {
   readonly attribute AudioChannel name;
 
   // This event is dispatched when this audiochannel is actually in used by the
   // app or one of the sub-iframes.
   attribute EventHandler onactivestatechanged;
 
   [Throws]
@@ -27,51 +27,51 @@ interface BrowserElementAudioChannel : E
 
   [Throws]
   DOMRequest isActive();
 };
 
 partial interface BrowserElementPrivileged {
   [Pure, Cached, Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   readonly attribute sequence<BrowserElementAudioChannel> allowedAudioChannels;
 
   /**
    * Mutes all audio in this browser.
    */
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void mute();
 
   /**
    * Unmutes all audio in this browser.
    */
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void unmute();
 
   /**
    * Obtains whether or not the browser is muted.
    */
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   DOMRequest getMuted();
 
   /**
    * Sets the volume for the browser.
    */
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   void setVolume(float volume);
 
   /**
    * Gets the volume for the browser.
    */
   [Throws,
    Pref="dom.mozBrowserFramesEnabled",
-   CheckAnyPermissions="browser"]
+   ChromeOnly]
   DOMRequest getVolume();
 };
--- a/dom/webidl/BrowserElementProxy.webidl
+++ b/dom/webidl/BrowserElementProxy.webidl
@@ -3,13 +3,13 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor,
  JSImplementation="@mozilla.org/dom/browser-element-proxy;1",
  NavigatorProperty="mozBrowserElementProxy",
  Pref="dom.mozBrowserFramesEnabled",
- CheckAnyPermissions="browser:embedded-system-app"]
+ ChromeOnly]
 interface BrowserElementProxy : EventTarget {
 };
 BrowserElementProxy implements BrowserElementCommon;
 BrowserElementProxy implements BrowserElementPrivileged;
--- a/dom/webidl/ChromeNotifications.webidl
+++ b/dom/webidl/ChromeNotifications.webidl
@@ -1,14 +1,14 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [JSImplementation="@mozilla.org/mozChromeNotifications;1",
  NavigatorProperty="mozChromeNotifications",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface ChromeNotifications {
   void mozResendAllNotifications(ResendCallback resendCallback);
 };
 
 callback ResendCallback = void (long count);
--- a/dom/webidl/Contacts.webidl
+++ b/dom/webidl/Contacts.webidl
@@ -54,17 +54,17 @@ dictionary ContactProperties {
   sequence<DOMString>?           org;
   sequence<DOMString>?           jobTitle;
   sequence<DOMString>?           note;
   sequence<DOMString>?           key;
 };
 
 [Constructor(optional ContactProperties properties),
  JSImplementation="@mozilla.org/contact;1",
- CheckAnyPermissions="contacts-read contacts-write contacts-create"]
+ ChromeOnly]
 interface mozContact {
                  attribute DOMString  id;
         readonly attribute Date?      published;
         readonly attribute Date?      updated;
 
                  attribute Date?      bday;
                  attribute Date?      anniversary;
 
@@ -113,17 +113,17 @@ dictionary ContactFindOptions : ContactF
   DOMString      filterValue;  // e.g. "Tom"
   DOMString      filterOp;     // e.g. "startsWith"
   any            filterBy;     // e.g. ["givenName", "nickname"]
   unsigned long  filterLimit = 0;
 };
 
 [NoInterfaceObject, NavigatorProperty="mozContacts",
  JSImplementation="@mozilla.org/contactManager;1",
- CheckAnyPermissions="contacts-read contacts-write contacts-create"]
+ ChromeOnly]
 interface ContactManager : EventTarget {
   DOMRequest find(optional ContactFindOptions options);
   DOMCursor  getAll(optional ContactFindSortOptions options);
   DOMRequest clear();
   DOMRequest save(mozContact contact);
   DOMRequest remove((mozContact or DOMString) contactOrId);
   DOMRequest getRevision();
   DOMRequest getCount();
--- a/dom/webidl/DOMMobileMessageError.webidl
+++ b/dom/webidl/DOMMobileMessageError.webidl
@@ -1,12 +1,11 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface DOMMobileMessageError : DOMError {
   readonly attribute (SmsMessage or MmsMessage) data;
 };
--- a/dom/webidl/DisplayPortInputPort.webidl
+++ b/dom/webidl/DisplayPortInputPort.webidl
@@ -1,9 +1,9 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+[Pref="dom.inputport.enabled", ChromeOnly]
  interface DisplayPortInputPort : InputPort {
  };
--- a/dom/webidl/DownloadEvent.webidl
+++ b/dom/webidl/DownloadEvent.webidl
@@ -1,17 +1,17 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString type, optional DownloadEventInit eventInitDict),
  Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
 interface DownloadEvent : Event
 {
   readonly attribute DOMDownload? download;
 };
 
 dictionary DownloadEventInit : EventInit
 {
   DOMDownload? download = null;
--- a/dom/webidl/Downloads.webidl
+++ b/dom/webidl/Downloads.webidl
@@ -16,17 +16,17 @@ enum DownloadState {
   "succeeded",
   "finalized"
 };
 
 [NoInterfaceObject,
  NavigatorProperty="mozDownloadManager",
  JSImplementation="@mozilla.org/downloads/manager;1",
  Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
 interface DOMDownloadManager : EventTarget {
   // This promise returns an array of downloads with all the current
   // download objects.
   Promise<sequence<DOMDownload>> getDownloads();
 
   // Removes one download from the downloads set. Returns a promise resolved
   // with the finalized download.
   [UnsafeInPrerendering]
@@ -51,26 +51,25 @@ interface DOMDownloadManager : EventTarg
   //
   // Applications must currently be certified to use this, but it could be
   // widened at a later time.
   //
   // Note that "download" is not actually optional, but WebIDL requires that it
   // be marked as such because it is not followed by a required argument.  The
   // promise will be rejected if the dictionary is omitted or the specified
   // file does not exist on disk.
-  [AvailableIn=CertifiedApps]
   Promise<DOMDownload> adoptDownload(optional AdoptDownloadDict download);
 
   // Fires when a new download starts.
   attribute EventHandler ondownloadstart;
 };
 
 [JSImplementation="@mozilla.org/downloads/download;1",
  Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
 interface DOMDownload : EventTarget {
   // The full size of the resource.
   readonly attribute long long totalBytes;
 
   // The number of bytes that we have currently downloaded.
   readonly attribute long long currentBytes;
 
   // The url of the resource.
--- a/dom/webidl/HDMIInputPort.webidl
+++ b/dom/webidl/HDMIInputPort.webidl
@@ -1,9 +1,9 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+[Pref="dom.inputport.enabled", ChromeOnly]
  interface HDMIInputPort : InputPort {
  };
--- a/dom/webidl/IccCardLockError.webidl
+++ b/dom/webidl/IccCardLockError.webidl
@@ -1,12 +1,11 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString errorName, short retryCount),
  Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface IccCardLockError : DOMError {
   readonly attribute short retryCount;
 };
--- a/dom/webidl/IccChangeEvent.webidl
+++ b/dom/webidl/IccChangeEvent.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  Constructor(DOMString type, optional IccChangeEventInit eventInitDict)]
 interface IccChangeEvent : Event
 {
   readonly attribute DOMString iccId;
 };
 
 dictionary IccChangeEventInit : EventInit
 {
--- a/dom/webidl/InputMethod.webidl
+++ b/dom/webidl/InputMethod.webidl
@@ -11,17 +11,17 @@
  * the remote input element.
  * The API also contains a few Gaia System app only methods
  * (marked with "input-manage" permission) for Gaia System app to interact with
  * some types of inputs and to regulate the input apps.
  */
 [JSImplementation="@mozilla.org/b2g-inputmethod;1",
  NavigatorProperty="mozInputMethod",
  Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input input-manage"]
+ ChromeOnly]
 interface MozInputMethod : EventTarget {
   /**
    * Activate or decactive current API instance.
    * Gaia System app call this method via BrowserElement#setInputMethodActive.
    */
   [ChromeOnly]
   void setActive(boolean isActive);
 
@@ -34,206 +34,187 @@ interface MozInputMethod : EventTarget {
    * Fired when the input context changes, include changes from and to null.
    * The new InputContext instance will be available in the event
    * object under |inputcontext| property.  When it changes to null it
    * means the app (the user of this API) no longer has the control of
    * the original focused input field.
    * Note that if the app saves the original context, it might get
    * void; implementation decides when to void the input context.
    */
-  [CheckAnyPermissions="input"]
   attribute EventHandler oninputcontextchange;
 
   /**
    * An "input context" is mapped to a text field that the app is
    * allow to mutate. This attribute should be null when there is no
    * text field currently focused.
    */
-  [CheckAnyPermissions="input"]
   readonly attribute MozInputContext? inputcontext;
 
   /**
    * Add a dynamically declared input.
    *
    * The id must not be the same with any statically declared input in the app
    * manifest. If an input of the same id is already declared, the info of that
    * input will be updated.
    */
-  [CheckAnyPermissions="input"]
   Promise<void> addInput(DOMString inputId,
                          MozInputMethodInputManifest inputManifest);
 
   /**
    * Remove a dynamically declared input.
    *
    * The id must not be the same with any statically declared input in the app
    * manifest. Silently resolves if the input is not previously declared;
    * rejects if attempt to remove a statically declared input.
    */
-  [CheckAnyPermissions="input"]
   Promise<void> removeInput(DOMString id);
 
   /**
    * Remove focus from the current input, usable by Gaia System app, globally,
    * regardless of the current focus state.
    */
-  [CheckAnyPermissions="input-manage"]
   void removeFocus();
 
   /**
    * The following are internal methods for Firefox OS System app only,
    * for handling the "option" group inputs.
    */
 
   /**
    * Set the value on the currently focused element. This has to be used
    * for special situations where the value had to be chosen amongst a
    * list (type=month) or a widget (type=date, time, etc.).
    * If the value passed in parameter isn't valid (in the term of HTML5
    * Forms Validation), the value will simply be ignored by the element.
    */
-  [CheckAnyPermissions="input-manage"]
   void setValue(DOMString value);
 
   /**
    * Select the <select> option specified by index.
    * If this method is called on a <select> that support multiple
    * selection, then the option specified by index will be added to
    * the selection.
    * If this method is called for a select that does not support multiple
    * selection the previous element will be unselected.
    */
-  [CheckAnyPermissions="input-manage"]
   void setSelectedOption(long index);
 
   /**
    * Select the <select> options specified by indexes. All other options
    * will be deselected.
    * If this method is called for a <select> that does not support multiple
    * selection, then the last index specified in indexes will be selected.
    */
-  [CheckAnyPermissions="input-manage"]
   void setSelectedOptions(sequence<long> indexes);
 };
 
 /**
  * InputMethodManager contains a few of the global methods for the input app.
  */
 [JSImplementation="@mozilla.org/b2g-imm;1",
  Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input input-manage"]
+ ChromeOnly]
 interface MozInputMethodManager : EventTarget {
   /**
    * Ask the OS to show a list of available inputs for users to switch from.
    * OS should sliently ignore this request if the app is currently not the
    * active one.
    */
-  [CheckAllPermissions="input"]
   void showAll();
 
   /**
    * Ask the OS to switch away from the current active input app.
    * OS should sliently ignore this request if the app is currently not the
    * active one.
    */
-  [CheckAllPermissions="input"]
   void next();
 
   /**
    * If this method returns true, it is recommended that the input app provides
    * a shortcut that would invoke the next() method above, for easy switching
    * between inputs -- i.e. show a "global" button on screen if the input app
    * implements an on-screen virtual keyboard.
    *
    * The returning value is depend on the inputType of the current input context.
    */
-  [CheckAllPermissions="input"]
   boolean supportsSwitching();
 
   /**
    * Ask the OS to remove the input focus, will cause the lost of input context.
    * OS should sliently ignore this request if the app is currently not the
    * active one.
    */
-  [CheckAllPermissions="input"]
   void hide();
 
   /**
    * Update Gecko with information on the input types which supportsSwitching()
    * should return ture.
    *
    * @param types Array of input types in which supportsSwitching() should
    *              return true.
    */
-  [CheckAllPermissions="input-manage"]
   void setSupportsSwitchingTypes(sequence<MozInputMethodInputContextInputTypes> types);
 
   /**
    * CustomEvent dispatches to System when there is an input to handle.
    * If the API consumer failed to handle and call preventDefault(),
    * there will be a message printed on the console.
    *
    * evt.detail is defined by MozInputContextFocusEventDetail.
    */
-  [CheckAnyPermissions="input-manage"]
   attribute EventHandler oninputcontextfocus;
 
   /**
    * Event dispatches to System when there is no longer an input to handle.
    * If the API consumer failed to handle and call preventDefault(),
    * there will be a message printed on the console.
    */
-  [CheckAnyPermissions="input-manage"]
   attribute EventHandler oninputcontextblur;
 
   /**
    * Event dispatches to System when there is a showAll() call.
    * If the API consumer failed to handle and call preventDefault(),
    * there will be a message printed on the console.
    */
-  [CheckAnyPermissions="input-manage"]
   attribute EventHandler onshowallrequest;
 
   /**
    * Event dispatches to System when there is a next() call.
    * If the API consumer failed to handle and call preventDefault(),
    * there will be a message printed on the console.
    */
-  [CheckAnyPermissions="input-manage"]
   attribute EventHandler onnextrequest;
 
   /**
    * Event dispatches to System when there is a addInput() call.
    * The API consumer must call preventDefault() to indicate the event is
    * consumed, otherwise the request is not considered handled even if
    * waitUntil() was called.
    *
    * evt.detail is defined by MozInputRegistryEventDetail.
    */
-  [CheckAnyPermissions="input-manage"]
   attribute EventHandler onaddinputrequest;
 
   /**
    * Event dispatches to System when there is a removeInput() call.
    * The API consumer must call preventDefault() to indicate the event is
    * consumed, otherwise the request is not considered handled even if
    * waitUntil() was called.
    *
    * evt.detail is defined by MozInputRegistryEventDetail.
    */
-  [CheckAnyPermissions="input-manage"]
   attribute EventHandler onremoveinputrequest;
 };
 
 /**
  * Detail of the inputcontextfocus event.
  */
 [JSImplementation="@mozilla.org/b2g-imm-focus;1",
  Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input-manage"]
+ ChromeOnly]
 interface MozInputContextFocusEventDetail {
   /**
    * The type of the focused input.
    */
   readonly attribute MozInputMethodInputContextTypes type;
   /**
    * The input type of the focused input.
    */
@@ -281,17 +262,17 @@ dictionary MozInputMethodChoiceDict {
   long? optionIndex;
 };
 
 /**
  * detail of addinputrequest or removeinputrequest event.
  */
 [JSImplementation="@mozilla.org/b2g-imm-input-registry;1",
  Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input-manage"]
+ ChromeOnly]
 interface MozInputRegistryEventDetail {
   /**
    * Manifest URL of the requesting app.
    */
   readonly attribute DOMString manifestURL;
   /**
    * ID of the input
    */
@@ -315,17 +296,17 @@ interface MozInputRegistryEventDetail {
  * input field. It also hosts the methods available to the keyboard app to
  * mutate the input field represented. An "input context" gets void when the
  * app is no longer allowed to interact with the text field,
  * e.g., the text field does no longer exist, the app is being switched to
  * background, and etc.
  */
 [JSImplementation="@mozilla.org/b2g-inputcontext;1",
  Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input"]
+ ChromeOnly]
 interface MozInputContext: EventTarget {
   /**
    * Type of the InputContext. See MozInputMethodInputContextTypes
    */
   readonly attribute MozInputMethodInputContextTypes? type;
 
   /**
    * InputType of the InputContext. See MozInputMethodInputContextInputTypes.
@@ -536,26 +517,26 @@ interface MozInputContext: EventTarget {
  * This interface will be added into inputcontext and used to receive the
  * events from the hardware keyboard.
  * Example:
  *   mozInputMethod.inputcontext.hardwareinput.addEventListener('keyup', this);
  *   mozInputMethod.inputcontext.hardwareinput.removeEventListener('keyup', this);
  */
 [JSImplementation="@mozilla.org/b2g-hardwareinput;1",
  Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input"]
+ ChromeOnly]
 interface MozHardwareInput: EventTarget {
 };
 
 /**
  * Detail of the selectionchange event.
  */
 [JSImplementation="@mozilla.org/b2g-imm-selectionchange;1",
  Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input"]
+ ChromeOnly]
 interface MozInputContextSelectionChangeEventDetail {
   /**
    * Indicate whether or not the change is due to our own action from,
    * for example, sendKey() call.
    *
    * Note: this property is untrustworthy because it would still be true even
    * if script in the page changed the text synchronously upon responding to
    * events trigger by the call.
@@ -569,17 +550,17 @@ interface MozInputContextSelectionChange
   readonly attribute long selectionEnd;
 };
 
 /**
  * Detail of the surroundingtextchange event.
  */
 [JSImplementation="@mozilla.org/b2g-imm-surroundingtextchange;1",
  Pref="dom.mozInputMethod.enabled",
- CheckAnyPermissions="input"]
+ ChromeOnly]
 interface MozInputContextSurroundingTextChangeEventDetail {
   /**
    * Indicate whether or not the change is due to our own action from,
    * for example, sendKey() call.
    *
    * Note: this property is untrustworthy because it would still be true even
    * if script in the page changed the text synchronously upon responding to
    * events trigger by the call.
--- a/dom/webidl/InputPort.webidl
+++ b/dom/webidl/InputPort.webidl
@@ -1,16 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * Reference https://wiki.mozilla.org/Input_Port_API#Basic_Port_Interface
  */
 
-[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+[Pref="dom.inputport.enabled", ChromeOnly]
 interface InputPort : EventTarget {
   readonly attribute DOMString id;
   readonly attribute MediaStream stream;
   readonly attribute boolean connected;
   attribute EventHandler onconnect;
   attribute EventHandler ondisconnect;
 };
--- a/dom/webidl/InputPortManager.webidl
+++ b/dom/webidl/InputPortManager.webidl
@@ -1,13 +1,13 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * Reference https://wiki.mozilla.org/Input_Port_API#InputPortManager
  */
 
-[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+[Pref="dom.inputport.enabled", ChromeOnly]
  interface InputPortManager {
    [Throws]
    Promise<sequence<InputPort>> getInputPorts();
  };
--- a/dom/webidl/MMICall.webidl
+++ b/dom/webidl/MMICall.webidl
@@ -1,13 +1,12 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Pref="dom.telephony.enabled",
- CheckAnyPermissions="telephony",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MMICall {
   [Throws]
   readonly attribute Promise<MozMMIResult> result;
 };
--- a/dom/webidl/MmsMessage.webidl
+++ b/dom/webidl/MmsMessage.webidl
@@ -10,18 +10,17 @@ dictionary MmsDeliveryInfo {
   DOMTimeStamp deliveryTimestamp = 0; // 0 if not available (e.g.,
                                       // |delivery| = "received" or not yet delivered).
   DOMString? readStatus = null;
   DOMTimeStamp readTimestamp = 0; // 0 if not available (e.g.,
                                   // |delivery| = "received" or not yet read).
 };
 
 [Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MmsMessage {
   /**
    * |type| is always "mms".
    */
   readonly attribute DOMString type;
 
   /**
    * The id of the message record in the database.
--- a/dom/webidl/MobileMessageThread.webidl
+++ b/dom/webidl/MobileMessageThread.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MobileMessageThread {
   /**
    * Unique identity of the thread.
    */
   readonly attribute unsigned long long id;
 
   /**
    * Last (MMS) message subject.
--- a/dom/webidl/MozCellBroadcast.webidl
+++ b/dom/webidl/MozCellBroadcast.webidl
@@ -4,17 +4,16 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Cell Broadcast short message service (CBS) permits a number of
  * unacknowledged general CBS messages to be broadcast to all receivers within
  * a particular region.
  */
 [Pref="dom.cellbroadcast.enabled",
- CheckAnyPermissions="cellbroadcast",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozCellBroadcast : EventTarget
 {
   /**
    * Cell Broadcast messages received.
    */
   attribute EventHandler onreceived;
 };
--- a/dom/webidl/MozCellBroadcastEvent.webidl
+++ b/dom/webidl/MozCellBroadcastEvent.webidl
@@ -1,18 +1,17 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString type, optional MozCellBroadcastEventInit eventInitDict),
  Pref="dom.cellbroadcast.enabled",
- CheckAnyPermissions="cellbroadcast",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozCellBroadcastEvent : Event
 {
   readonly attribute MozCellBroadcastMessage? message;
 };
 
 dictionary MozCellBroadcastEventInit : EventInit
 {
   MozCellBroadcastMessage? message = null;
--- a/dom/webidl/MozCellBroadcastMessage.webidl
+++ b/dom/webidl/MozCellBroadcastMessage.webidl
@@ -7,18 +7,17 @@
 enum CellBroadcastGsmGeographicalScope {"cell-immediate", "plmn",
                                         "location-area", "cell"};
 enum CellBroadcastMessageClass {"class-0", "class-1", "class-2",
                                 "class-3", "user-1", "user-2", "normal"};
 enum CellBroadcastEtwsWarningType {"earthquake", "tsunami",
                                    "earthquake-tsunami", "test", "other"};
 
 [Pref="dom.cellbroadcast.enabled",
- CheckAnyPermissions="cellbroadcast",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozCellBroadcastMessage
 {
   /**
    * The Service Id in the device where the message is received from.
    */
   readonly attribute unsigned long serviceId;
 
   /**
@@ -70,18 +69,17 @@ interface MozCellBroadcastMessage
 
   /**
    * Service Category.
    */
   readonly attribute unsigned short? cdmaServiceCategory;
 };
 
 [Pref="dom.cellbroadcast.enabled",
- CheckAnyPermissions="cellbroadcast",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozCellBroadcastEtwsInfo
 {
   /**
    * Warning type. Possible values are "earthquake", "tsunami",
    * "earthquake-tsunami", "test" and "other".
    */
   readonly attribute CellBroadcastEtwsWarningType? warningType;
 
--- a/dom/webidl/MozContactChangeEvent.webidl
+++ b/dom/webidl/MozContactChangeEvent.webidl
@@ -1,16 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString type, optional MozContactChangeEventInit eventInitDict),
- CheckAnyPermissions="contacts-read contacts-write contacts-create"]
+ ChromeOnly]
 interface MozContactChangeEvent : Event
 {
   readonly attribute DOMString? contactID;
   readonly attribute DOMString? reason;
 };
 
 dictionary MozContactChangeEventInit : EventInit
 {
--- a/dom/webidl/MozIcc.webidl
+++ b/dom/webidl/MozIcc.webidl
@@ -135,18 +135,17 @@ dictionary IccCardLockStatus
 };
 
 dictionary IccCardLockRetryCount
 {
   long retryCount; // The number of remaining retries. -1 if unkown.
 };
 
 [Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozIcc : EventTarget
 {
   // Integrated Circuit Card Information.
 
   /**
    * Information stored in the device's ICC.
    *
    * Once the ICC becomes undetectable, iccinfochange event will be notified.
--- a/dom/webidl/MozIccInfo.webidl
+++ b/dom/webidl/MozIccInfo.webidl
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 enum IccType {"sim", "usim", "csim", "ruim"};
 
 [Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozIccInfo {
   /**
    * Integrated Circuit Card Type.
    */
   readonly attribute IccType? iccType;
 
   /**
    * Integrated Circuit Card Identifier.
@@ -40,29 +39,27 @@ interface MozIccInfo {
 
   /**
    * Service provider name must be a part of displayed carrier name.
    */
   readonly attribute boolean isDisplaySpnRequired;
 };
 
 [Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozGsmIccInfo : MozIccInfo {
   /**
    * Mobile Station ISDN Number (MSISDN) of the subscriber, aka
    * his phone number.
    */
   readonly attribute DOMString? msisdn;
 };
 
 [Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozCdmaIccInfo : MozIccInfo {
   /**
    * Mobile Directory Number (MDN) of the subscriber, aka his phone number.
    */
   readonly attribute DOMString? mdn;
 
   /**
    * Preferred Roaming List (PRL) version of the subscriber.
--- a/dom/webidl/MozIccManager.webidl
+++ b/dom/webidl/MozIccManager.webidl
@@ -1,16 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 [Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozIccManager : EventTarget
 {
   /**
    * STK menu presentation types.
    */
   const unsigned short STK_MENU_TYPE_NOT_SPECIFIED      = 0x00;
   const unsigned short STK_MENU_TYPE_DATA_VALUES        = 0x01;
   const unsigned short STK_MENU_TYPE_NAVIGATION_OPTIONS = 0x03;
--- a/dom/webidl/MozIsoDepTech.webidl
+++ b/dom/webidl/MozIsoDepTech.webidl
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[Func="Navigator::HasNFCSupport", AvailableIn="PrivilegedApps",
+[Func="Navigator::HasNFCSupport", ChromeOnly,
  ChromeConstructor(MozNFCTag tag)]
 interface MozIsoDepTech {
   /**
    * Send raw ISO-DEP command to tag and receive the response.
    */
   [Throws]
   Promise<Uint8Array> transceive(Uint8Array command);
 };
--- a/dom/webidl/MozMessageDeletedEvent.webidl
+++ b/dom/webidl/MozMessageDeletedEvent.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  Constructor(DOMString type, optional MozMessageDeletedEventInit eventInitDict)]
 interface MozMessageDeletedEvent : Event
 {
   // Array of deleted message ids.
   [Cached, Constant] readonly attribute sequence<long>? deletedMessageIds;
   // Array of deleted thread ids.
   [Cached, Constant] readonly attribute sequence<unsigned long long>? deletedThreadIds;
 };
--- a/dom/webidl/MozMmsEvent.webidl
+++ b/dom/webidl/MozMmsEvent.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  Constructor(DOMString type, optional MozMmsEventInit eventInitDict)]
 interface MozMmsEvent : Event
 {
   readonly attribute MmsMessage? message;
 };
 
 dictionary MozMmsEventInit : EventInit
 {
--- a/dom/webidl/MozMobileConnection.webidl
+++ b/dom/webidl/MozMobileConnection.webidl
@@ -68,104 +68,97 @@ interface MozMobileConnection : EventTar
   const long CLIR_DEFAULT     = 0;
   const long CLIR_INVOCATION  = 1;
   const long CLIR_SUPPRESSION = 2;
 
   /**
    * These two fields can be accessed by privileged applications with the
    * 'mobilenetwork' permission.
    */
-  [CheckAnyPermissions="mobilenetwork"]
   readonly attribute DOMString lastKnownNetwork;
-  [CheckAnyPermissions="mobilenetwork"]
   readonly attribute DOMString lastKnownHomeNetwork;
 
   /**
    * Information about the voice connection.
    */
-  [CheckAnyPermissions="mobileconnection"]
   readonly attribute MozMobileConnectionInfo voice;
 
   /**
    * Information about the data connection.
    */
-  [CheckAnyPermissions="mobileconnection"]
   readonly attribute MozMobileConnectionInfo data;
 
   /**
    * Integrated Circuit Card Identifier of the SIM this mobile connection
    * corresponds to.
    */
-  [CheckAnyPermissions="mobileconnection"]
   readonly attribute DOMString? iccId;
 
   /**
    * The selection mode of the voice and data networks.
    */
-  [CheckAnyPermissions="mobileconnection"]
   readonly attribute MobileNetworkSelectionMode? networkSelectionMode;
 
   /**
    * The current radio state.
    */
-  [CheckAnyPermissions="mobileconnection"]
   readonly attribute MobileRadioState? radioState;
 
   /**
    * Array of network types that are supported by this radio.
    */
-  [Cached, Pure, CheckAnyPermissions="mobileconnection"]
+  [Cached, Pure]
   readonly attribute sequence<MobileNetworkType> supportedNetworkTypes;
 
   /**
    * Search for available networks.
    *
    * @return a DOMRequest.
    *
    * If successful, the request's onsuccess will be called. And the request's
    * result will be an array of MozMobileNetworkInfo.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported', or
    * 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest getNetworks();
 
   /**
    * Manually selects the passed in network, overriding the radio's current
    * selection.
    *
    * @return a DOMRequest.
    *
    * If successful, the request's onsuccess will be called.
    * Note: If the network was actually changed by this request,
    * the 'voicechange' and 'datachange' events will also be fired.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest selectNetwork(MozMobileNetworkInfo network);
 
   /**
    * Tell the radio to automatically select a network.
    *
    * @return a DOMRequest.
    *
    * If successful, the request's onsuccess will be called.
    * Note: If the network was actually changed by this request, the
    * 'voicechange' and 'datachange' events will also be fired.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest selectNetworkAutomatically();
 
   /**
    * Set preferred network type.
    *
    * @param type
    *        PreferredNetworkType indicates the desired preferred network type.
    *
@@ -173,17 +166,17 @@ interface MozMobileConnection : EventTar
    *
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'InvalidParameter', 'ModeNotSupported', 'IllegalSIMorME', or
    * 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest setPreferredNetworkType(MobilePreferredNetworkType type);
 
   /**
    * Query current preferred network type.
    *
    * @return a DOMRequest.
    *
    * If successful, the request's onsuccess will be called. And the request's
@@ -191,50 +184,50 @@ interface MozMobileConnection : EventTar
    * The value will be either 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto',
    * 'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo', 'lte/cdma/evdo',
    * 'lte/wcdma/gsm', 'lte/wcdma/gsm/cdma/evdo', 'lte' or 'lte/wcdma'.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest getPreferredNetworkType();
 
   /**
    * Set roaming preference.
    *
    * @param mode
    *        RoamingPreferenceMode indicates the desired roaming preference.
    *
    * @return a DOMRequest.
    *
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest setRoamingPreference(MobileRoamingMode mode);
 
   /**
    * Query current roaming preference.
    *
    * @return a DOMRequest.
    *
    * If successful, the request's onsuccess will be called. And the request's
    * result will be a string indicating the current roaming preference.
    * The value will be either 'home', 'affiliated', or 'any'.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest getRoamingPreference();
 
   /**
    * Set voice privacy preference.
    *
    * @param enabled
    *        Boolean indicates the preferred voice privacy mode used in voice
    *        scrambling in CDMA networks. 'True' means the enhanced voice security
@@ -243,32 +236,32 @@ interface MozMobileConnection : EventTar
    * @return a DOMRequest.
    *
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest setVoicePrivacyMode(boolean enabled);
 
   /**
    * Query current voice privacy mode.
    *
    * @return a DOMRequest.
    *
    * If successful, the request's onsuccess will be called. And the request's
    * result will be a boolean indicating the current voice privacy mode.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest getVoicePrivacyMode();
 
   /**
    * Configures call forward options.
    *
    * @param options
    *        An object containing the call forward rule to set.
    * @see MozCallForwardingOptions for the detail of options.
@@ -276,17 +269,17 @@ interface MozMobileConnection : EventTar
    * @return a DOMRequest
    *
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest setCallForwardingOption(optional MozCallForwardingOptions options);
 
   /**
    * Queries current call forward options.
    *
    * @param reason
    *        Indicates the reason the call is being forwarded. It shall be one of
    *        the MozMobileConnection.CALL_FORWARD_REASON_* values.
@@ -296,17 +289,17 @@ interface MozMobileConnection : EventTar
    * If successful, the request's onsuccess will be called. And the request's
    * result will be an array of MozCallForwardingOptions.
    * @see MozCallForwardingOptions for the detail of result.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest getCallForwardingOption(unsigned short reason);
 
   /**
    * Configures call barring options.
    *
    * @param options
    *        An object containing the call barring rule to set.
    * @see MozCallBarringOptions for the detail of options.
@@ -314,17 +307,17 @@ interface MozMobileConnection : EventTar
    * @return a DOMRequest
    *
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest setCallBarringOption(optional MozCallBarringOptions options);
 
   /**
    * Queries current call barring status.
    *
    * @param options
    *        An object containing the call barring rule to query. No need to
    *        specify 'enabled' property.
@@ -336,17 +329,17 @@ interface MozMobileConnection : EventTar
    * result will be an object of MozCallBarringOptions with correct 'enabled'
    * property indicating the status of this rule.
    * @see MozCallBarringOptions for the detail of result.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest getCallBarringOption(optional MozCallBarringOptions options);
 
   /**
    * Change call barring facility password.
    *
    * @param options
    *        An object containing information about pin and newPin, and,
    *        this object must have both "pin" and "newPin" attributes
@@ -361,49 +354,49 @@ interface MozMobileConnection : EventTar
    * @return a DOMRequest.
    *
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest changeCallBarringPassword(optional MozCallBarringOptions options);
 
   /**
    * Configures call waiting options.
    *
    * @param enabled
    *        Boolean indicates the desired call waiting status.
    *
    * @return a DOMRequest.
    *
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest setCallWaitingOption(boolean enabled);
 
   /**
    * Queries current call waiting options.
    *
    * @return a DOMRequest
    *
    * If successful, the request's onsuccess will be called. And the request's
    * result will be a boolean indicating the call waiting status.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest getCallWaitingOption();
 
   /**
    * Enables or disables the presentation of the calling line identity (CLI) to
    * the called party when originating a call.
    *
    * @param mode
    *        It shall be one of the MozMobileConnection.CLIR_* values.
@@ -411,47 +404,47 @@ interface MozMobileConnection : EventTar
    * @return a DOMRequest
    *
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest setCallingLineIdRestriction(unsigned short mode);
 
   /**
    * Queries current CLIR status.
    *
    * @return a DOMRequest
    *
    * If successful, the request's onsuccess will be called. And the request's
    * result will be an object containing containing CLIR 'n' and 'm' parameter.
    * @see MozClirStatus for the detail of result.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest getCallingLineIdRestriction();
 
   /**
    * Exit emergency callback mode.
    *
    * @return a DOMRequest
    *
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'IllegalSIMorME', or 'GenericFailure'.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest exitEmergencyCbMode();
 
   /**
    * Set radio enabled/disabled.
    *
    * @param enabled
    *        True to enable the radio.
    *
@@ -462,17 +455,17 @@ interface MozMobileConnection : EventTar
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'InvalidStateError', 'RadioNotAvailable',
    * 'IllegalSIMorME', or 'GenericFailure'.
    *
    * Note: Request is not available when radioState is null, 'enabling', or
    * 'disabling'. Calling the function in above conditions will receive
    * 'InvalidStateError' error.
    */
-  [Throws, CheckAnyPermissions="mobileconnection"]
+  [Throws]
   DOMRequest setRadioEnabled(boolean enabled);
 
   /**
    * The 'voicechange' event is notified whenever the voice connection object
    * changes.
    */
   attribute EventHandler onvoicechange;
 
--- a/dom/webidl/MozMobileMessageManager.webidl
+++ b/dom/webidl/MozMobileMessageManager.webidl
@@ -107,18 +107,17 @@ dictionary TypeOfAddress {
  * SMSC address.
  */
 dictionary SmscAddress {
   DOMString address;
   TypeOfAddress typeOfAddress;
 };
 
 [Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozMobileMessageManager : EventTarget
 {
   [Throws]
   DOMRequest getSegmentInfoForText(DOMString text);
 
   /**
    * Send SMS.
    *
--- a/dom/webidl/MozNFC.webidl
+++ b/dom/webidl/MozNFC.webidl
@@ -30,68 +30,66 @@ enum NfcErrorMessage {
 interface MozNFCManager {
   /**
    * API to check if the given application's manifest
    * URL is registered with the Chrome Process or not.
    *
    * Returns success if given manifestUrl is registered for 'onpeerready',
    * otherwise error
    */
-  [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+  [ChromeOnly]
   Promise<boolean> checkP2PRegistration(DOMString manifestUrl);
 
   /**
    * Notify that user has accepted to share nfc message on P2P UI
    */
-  [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+  [ChromeOnly]
   void notifyUserAcceptedP2P(DOMString manifestUrl);
 
   /**
    * Notify the status of sendFile operation
    */
-  [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+  [ChromeOnly]
   void notifySendFileStatus(octet status, DOMString requestId);
 
   /**
    * Power on the NFC hardware and start polling for NFC tags or devices.
    */
-  [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+  [ChromeOnly]
   Promise<void> startPoll();
 
   /**
    * Stop polling for NFC tags or devices. i.e. enter low power mode.
    */
-  [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+  [ChromeOnly]
   Promise<void> stopPoll();
 
   /**
    * Power off the NFC hardware.
    */
-  [CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
+  [ChromeOnly]
   Promise<void> powerOff();
 };
 
 [JSImplementation="@mozilla.org/nfc/manager;1",
  NavigatorProperty="mozNfc",
  Func="Navigator::HasNFCSupport",
- CheckAnyPermissions="nfc nfc-share",
- AvailableIn="PrivilegedApps",
+ ChromeOnly,
  UnsafeInPrerendering]
 interface MozNFC : EventTarget {
   /**
    * Indicate if NFC is enabled.
    */
   readonly attribute boolean enabled;
 
   /**
    * This event will be fired when another NFCPeer is detected, and user confirms
    * to share data to the NFCPeer object by calling mozNFC.notifyUserAcceptedP2P.
    * The event will be type of NFCPeerEvent.
    */
-  [CheckAnyPermissions="nfc-share", AvailableIn=CertifiedApps]
   attribute EventHandler onpeerready;
 
   /**
    * This event will be fired when a NFCPeer is detected. The application has to
    * be running on the foreground (decided by System app) to receive this event.
    *
    * The default action of this event is to dispatch the event in System app
    * again, and System app will run the default UX behavior (like vibration).
--- a/dom/webidl/MozNFCPeer.webidl
+++ b/dom/webidl/MozNFCPeer.webidl
@@ -3,33 +3,33 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * Part of this IDL file is from:
  * http://w3c.github.io/nfc/proposals/common/nfc.html#idl-def-NFCPeer
  *
  * Copyright © 2013 Deutsche Telekom, Inc.
  */
 
-[JSImplementation="@mozilla.org/nfc/peer;1", AvailableIn="PrivilegedApps"]
+[JSImplementation="@mozilla.org/nfc/peer;1", ChromeOnly]
 interface MozNFCPeer {
   /**
    * Indicate if this peer is already lost.
    */
   readonly attribute boolean isLost;
 
   /**
    * Send NDEF data to peer device.
    */
   [Throws]
   Promise<void> sendNDEF(sequence<MozNDEFRecord> records);
 
   /**
    * Send file to peer device.
    */
-  [Throws, CheckAnyPermissions="nfc-share", AvailableIn="CertifiedApps"]
+  [Throws]
   Promise<void> sendFile(Blob blob);
 };
 
 // Mozilla Only
 partial interface MozNFCPeer {
   [ChromeOnly]
   attribute DOMString session;
 
--- a/dom/webidl/MozNFCPeerEvent.webidl
+++ b/dom/webidl/MozNFCPeerEvent.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString type, optional MozNFCPeerEventInit eventInitDict),
- Func="Navigator::HasNFCSupport", CheckAnyPermissions="nfc nfc-share",
- AvailableIn="PrivilegedApps"]
+ Func="Navigator::HasNFCSupport", ChromeOnly]
 interface MozNFCPeerEvent : Event
 {
   /**
    * The detected NFCPeer.
    */
   readonly attribute MozNFCPeer? peer;
 };
 
--- a/dom/webidl/MozNFCTag.webidl
+++ b/dom/webidl/MozNFCTag.webidl
@@ -33,17 +33,17 @@ enum NFCTagType {
   "Type2",
   "Type3",
   "Type4",
   "MIFARE-Classic"
 };
 
 typedef (MozIsoDepTech or MozNfcATech) MozTagTech;
 
-[JSImplementation="@mozilla.org/nfc/tag;1", AvailableIn="PrivilegedApps"]
+[JSImplementation="@mozilla.org/nfc/tag;1", ChromeOnly]
 interface MozNFCTag {
   /**
    * The supported technologies of this tag, null if unknown.
    */
   [Cached, Pure] readonly attribute sequence<NFCTechType>? techList;
 
   /**
    * The identifier of this tag.
--- a/dom/webidl/MozNFCTagEvent.webidl
+++ b/dom/webidl/MozNFCTagEvent.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString type, optional MozNFCTagEventInit eventInitDict),
- Func="Navigator::HasNFCSupport", CheckAnyPermissions="nfc",
- AvailableIn="PrivilegedApps"]
+ Func="Navigator::HasNFCSupport", ChromeOnly]
 interface MozNFCTagEvent : Event
 {
   /**
    * The detected NFCTag.
    */
   readonly attribute MozNFCTag? tag;
 
   /**
--- a/dom/webidl/MozNetworkStats.webidl
+++ b/dom/webidl/MozNetworkStats.webidl
@@ -28,17 +28,16 @@ dictionary NetworkStatsGetOptions
 dictionary NetworkStatsAlarmOptions
 {
   Date startTime;
   Date data;
 };
 
 [JSImplementation="@mozilla.org/networkstats;1",
  ChromeOnly,
- CheckAnyPermissions="networkstats-manage",
  Pref="dom.mozNetworkStats.enabled"]
 interface MozNetworkStats {
   /**
    * App manifest URL of an application for specifying the per-app stats of the
    * specified app.
    */
   readonly attribute DOMString    appManifestURL;
 
--- a/dom/webidl/MozNetworkStatsAlarm.webidl
+++ b/dom/webidl/MozNetworkStatsAlarm.webidl
@@ -1,14 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 [JSImplementation="@mozilla.org/networkstatsalarm;1",
  ChromeOnly,
- CheckAnyPermissions="networkstats-manage",
  Pref="dom.mozNetworkStats.enabled"]
 interface MozNetworkStatsAlarm {
   readonly attribute unsigned long alarmId;
   readonly attribute MozNetworkStatsInterface network;
   readonly attribute long long threshold;
   readonly attribute any data;
 };
--- a/dom/webidl/MozNetworkStatsData.webidl
+++ b/dom/webidl/MozNetworkStatsData.webidl
@@ -1,13 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 [JSImplementation="@mozilla.org/networkStatsdata;1",
  ChromeOnly,
- CheckAnyPermissions="networkstats-manage",
  Pref="dom.mozNetworkStats.enabled"]
 interface MozNetworkStatsData {
   readonly attribute unsigned long   rxBytes;   // Received bytes.
   readonly attribute unsigned long   txBytes;   // Sent bytes.
   readonly attribute Date            date;      // Date.
 };
--- a/dom/webidl/MozNetworkStatsInterface.webidl
+++ b/dom/webidl/MozNetworkStatsInterface.webidl
@@ -7,17 +7,17 @@ dictionary NetworkInterface {
   DOMString id;
 };
 
 /**
  * Represents a data interface for which the manager is recording statistics.
  */
 [Constructor(optional NetworkInterface networkinterface),
  JSImplementation="@mozilla.org/networkstatsinterface;1",
- CheckAnyPermissions="networkstats-manage",
+ ChromeOnly, 
  Pref="dom.mozNetworkStats.enabled"]
 interface MozNetworkStatsInterface {
   readonly attribute long type;
 
   /**
    * Id value is '0' for wifi or the iccid for mobile (SIM).
    */
   readonly attribute DOMString id;
--- a/dom/webidl/MozNetworkStatsManager.webidl
+++ b/dom/webidl/MozNetworkStatsManager.webidl
@@ -1,17 +1,17 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [NavigatorProperty="mozNetworkStats",
  JSImplementation="@mozilla.org/networkStatsManager;1",
- CheckAnyPermissions="networkstats-manage",
+ ChromeOnly,
  Pref="dom.mozNetworkStats.enabled"]
 interface MozNetworkStatsManager {
   /**
    * Constants for known interface types.
    */
   const long WIFI = 0;
   const long MOBILE = 1;
 
--- a/dom/webidl/MozNfcATech.webidl
+++ b/dom/webidl/MozNfcATech.webidl
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-[Func="Navigator::HasNFCSupport", AvailableIn="PrivilegedApps",
+[Func="Navigator::HasNFCSupport", ChromeOnly,
  ChromeConstructor(MozNFCTag tag)]
 interface MozNfcATech {
   /**
    * Send raw NFC-A command to tag and receive the response.
    */
   [Throws]
   Promise<Uint8Array> transceive(Uint8Array command);
 };
--- 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/MozSettingsEvent.webidl
+++ b/dom/webidl/MozSettingsEvent.webidl
@@ -1,16 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString type, optional MozSettingsEventInit eventInitDict),
- CheckAnyPermissions="settings-api-read settings-api-write"]
+ ChromeOnly]
 interface MozSettingsEvent : Event
 {
   readonly attribute DOMString? settingName;
   readonly attribute any settingValue;
 };
 
 dictionary MozSettingsEventInit : EventInit
 {
--- a/dom/webidl/MozSettingsTransactionEvent.webidl
+++ b/dom/webidl/MozSettingsTransactionEvent.webidl
@@ -1,16 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString type, optional MozSettingsTransactionEventInit eventInitDict),
- CheckAnyPermissions="settings-api-read settings-api-write"]
+ ChromeOnly]
 interface MozSettingsTransactionEvent : Event
 {
   readonly attribute DOMString? error;
 };
 
 dictionary MozSettingsTransactionEventInit : EventInit
 {
   DOMString error = "";
--- a/dom/webidl/MozSmsEvent.webidl
+++ b/dom/webidl/MozSmsEvent.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  Constructor(DOMString type, optional MozSmsEventInit eventInitDict)]
 interface MozSmsEvent : Event
 {
   readonly attribute SmsMessage? message;
 };
 
 dictionary MozSmsEventInit : EventInit
 {
--- a/dom/webidl/MozStkCommandEvent.webidl
+++ b/dom/webidl/MozStkCommandEvent.webidl
@@ -50,18 +50,17 @@ dictionary MozStkIconContainer
    *
    * Array of icons, basically of a same image, that may differ in size,
    * resolution or coding scheme. The first icon should be the default one.
    */
   sequence<MozStkIcon> icons;
 };
 
 [Pref="dom.icc.enabled",
- CheckAnyPermissions="mobileconnection",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  Constructor(DOMString type, optional MozStkCommandEventInit eventInitDict)]
 interface MozStkCommandEvent : Event
 {
   readonly attribute any command;
 };
 
 dictionary MozStkCommandEventInit : EventInit
 {
--- a/dom/webidl/MozTetheringManager.webidl
+++ b/dom/webidl/MozTetheringManager.webidl
@@ -27,17 +27,17 @@ dictionary TetheringConfiguration {
   DOMString endIp;
   DOMString dns1;
   DOMString dns2;
   WifiTetheringConfig wifiConfig;
 };
 
 [JSImplementation="@mozilla.org/tetheringmanager;1",
  NavigatorProperty="mozTetheringManager",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozTetheringManager {
   /**
    * Enable/Disable tethering.
    * @param enabled True to enable tethering, False to disable tethering.
    * @param type Tethering type to enable/disable.
    * @param config Configuration should have following fields when enable is True:
    *               - ip ip address.
    *               - prefix mask length.
--- a/dom/webidl/MozVoicemail.webidl
+++ b/dom/webidl/MozVoicemail.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
 /* vim: set ts=2 et sw=2 tw=40: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 [Pref="dom.voicemail.enabled",
- CheckAnyPermissions="voicemail",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozVoicemail : EventTarget
 {
   /**
    * The current voicemail status of a specified service, or null when the
    * status is unknown.
    */
   [Throws]
   MozVoicemailStatus getStatus(optional unsigned long serviceId);
--- a/dom/webidl/MozVoicemailEvent.webidl
+++ b/dom/webidl/MozVoicemailEvent.webidl
@@ -1,18 +1,17 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Constructor(DOMString type, optional MozVoicemailEventInit eventInitDict),
  Pref="dom.voicemail.enabled",
- CheckAnyPermissions="voicemail",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozVoicemailEvent : Event
 {
   readonly attribute MozVoicemailStatus? status;
 };
 
 dictionary MozVoicemailEventInit : EventInit
 {
   MozVoicemailStatus? status = null;
--- a/dom/webidl/MozVoicemailStatus.webidl
+++ b/dom/webidl/MozVoicemailStatus.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
 /* vim: set ts=2 et sw=2 tw=40: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 [Pref="dom.voicemail.enabled",
- CheckAnyPermissions="voicemail",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface MozVoicemailStatus
 {
   readonly attribute unsigned long serviceId;
 
   /**
    * Whether or not there are messages waiting in the voicemail box
    */
   readonly attribute boolean hasMessages;
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -89,20 +89,20 @@ interface NavigatorContentUtils {
 [NoInterfaceObject]
 interface NavigatorStorageUtils {
   // NOT IMPLEMENTED
   //void yieldForStorageUpdates();
 };
 
 [NoInterfaceObject]
 interface NavigatorFeatures {
-  [CheckAnyPermissions="feature-detection", Throws]
+  [ChromeOnly, Throws]
   Promise<any> getFeature(DOMString name);
 
-  [CheckAnyPermissions="feature-detection", Throws]
+  [ChromeOnly, Throws]
   Promise<any> hasFeature(DOMString name);
 };
 
 partial interface Navigator {
   [Throws]
   readonly attribute Permissions permissions;
 };
 
@@ -201,33 +201,33 @@ 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.
    */
-  [Throws, CheckAnyPermissions="idle"]
+  [Throws, ChromeOnly]
   void addIdleObserver(MozIdleObserver aIdleObserver);
 
   /**
    * Navigator requests to remove an idle observer from the existing window.
    */
-  [Throws, CheckAnyPermissions="idle"]
+  [Throws, ChromeOnly]
   void removeIdleObserver(MozIdleObserver aIdleObserver);
 
   /**
    * Request a wake lock for a resource.
    *
    * A page holds a wake lock to request that a resource not be turned
    * off (or otherwise made unavailable).
    *
@@ -275,17 +275,17 @@ partial interface Navigator {
 // nsIDOMNavigatorDesktopNotification
 partial interface Navigator {
   [Throws, Pref="notification.feature.enabled", UnsafeInPrerendering]
   readonly attribute DesktopNotificationCenter mozNotification;
 };
 
 #ifdef MOZ_WEBSMS_BACKEND
 partial interface Navigator {
-  [CheckAnyPermissions="sms", Pref="dom.sms.enabled", AvailableIn="CertifiedApps"]
+  [ChromeOnly, Pref="dom.sms.enabled"]
   readonly attribute MozMobileMessageManager? mozMobileMessage;
 };
 #endif
 
 // NetworkInformation
 partial interface Navigator {
   [Throws, Pref="dom.netinfo.enabled"]
   readonly attribute NetworkInformation connection;
@@ -294,40 +294,40 @@ partial interface Navigator {
 // nsIDOMNavigatorCamera
 partial interface Navigator {
   [Throws, Func="Navigator::HasCameraSupport", UnsafeInPrerendering]
   readonly attribute CameraManager mozCameras;
 };
 
 #ifdef MOZ_B2G_RIL
 partial interface Navigator {
-  [Throws, Pref="dom.mobileconnection.enabled", CheckAnyPermissions="mobileconnection mobilenetwork", UnsafeInPrerendering]
+  [Throws, Pref="dom.mobileconnection.enabled", ChromeOnly, UnsafeInPrerendering]
   readonly attribute MozMobileConnectionArray mozMobileConnections;
 };
 
 partial interface Navigator {
-  [Throws, Pref="dom.cellbroadcast.enabled", CheckAnyPermissions="cellbroadcast",
-   AvailableIn="CertifiedApps", UnsafeInPrerendering]
+  [Throws, Pref="dom.cellbroadcast.enabled", ChromeOnly,
+   UnsafeInPrerendering]
   readonly attribute MozCellBroadcast mozCellBroadcast;
 };
 
 partial interface Navigator {
-  [Throws, Pref="dom.voicemail.enabled", CheckAnyPermissions="voicemail",
-   AvailableIn="CertifiedApps", UnsafeInPrerendering]
+  [Throws, Pref="dom.voicemail.enabled", ChromeOnly,
+   UnsafeInPrerendering]
   readonly attribute MozVoicemail mozVoicemail;
 };
 
 partial interface Navigator {
-  [Throws, Pref="dom.icc.enabled", CheckAnyPermissions="mobileconnection",
-   AvailableIn="CertifiedApps", UnsafeInPrerendering]
+  [Throws, Pref="dom.icc.enabled", ChromeOnly,
+   UnsafeInPrerendering]
   readonly attribute MozIccManager? mozIccManager;
 };
 
 partial interface Navigator {
-  [Throws, Pref="dom.telephony.enabled", CheckAnyPermissions="telephony", UnsafeInPrerendering]
+  [Throws, Pref="dom.telephony.enabled", ChromeOnly, UnsafeInPrerendering]
   readonly attribute Telephony? mozTelephony;
 };
 #endif // MOZ_B2G_RIL
 
 #ifdef MOZ_GAMEPAD
 // https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension
 partial interface Navigator {
   [Throws, Pref="dom.gamepad.enabled"]
@@ -341,32 +341,32 @@ partial interface Navigator {
 
 partial interface Navigator {
   [Throws, Pref="dom.vr.enabled"]
   Promise<sequence<VRDevice>> getVRDevices();
 };
 
 #ifdef MOZ_B2G_BT
 partial interface Navigator {
-  [Throws, CheckAnyPermissions="bluetooth", UnsafeInPrerendering]
+  [Throws, ChromeOnly, UnsafeInPrerendering]
   readonly attribute BluetoothManager mozBluetooth;
 };
 #endif // MOZ_B2G_BT
 
 #ifdef MOZ_B2G_FM
 partial interface Navigator {
-  [Throws, CheckAnyPermissions="fmradio", UnsafeInPrerendering]
+  [Throws, ChromeOnly, UnsafeInPrerendering]
   readonly attribute FMRadio mozFMRadio;
 };
 #endif // MOZ_B2G_FM
 
 #ifdef MOZ_TIME_MANAGER
 // nsIDOMMozNavigatorTime
 partial interface Navigator {
-  [Throws, CheckAnyPermissions="time", UnsafeInPrerendering]
+  [Throws, ChromeOnly, UnsafeInPrerendering]
   readonly attribute MozTimeManager mozTime;
 };
 #endif // MOZ_TIME_MANAGER
 
 #ifdef MOZ_AUDIO_CHANNEL_MANAGER
 // nsIMozNavigatorAudioChannelManager
 partial interface Navigator {
   [Throws]
@@ -416,32 +416,32 @@ partial interface Navigator {
 
 partial interface Navigator {
   [Throws, Pref="beacon.enabled"]
   boolean sendBeacon(DOMString url,
                      optional (ArrayBufferView or Blob or DOMString or FormData)? data = null);
 };
 
 partial interface Navigator {
-  [Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+  [Pref="dom.tv.enabled", ChromeOnly]
   readonly attribute TVManager? tv;
 };
 
 partial interface Navigator {
-  [Throws, Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
+  [Throws, Pref="dom.inputport.enabled", ChromeOnly]
   readonly attribute InputPortManager inputPortManager;
 };
 
 partial interface Navigator {
   [Throws, Pref="dom.presentation.enabled", Func="Navigator::HasPresentationSupport", SameObject]
   readonly attribute Presentation? presentation;
 };
 
 partial interface Navigator {
-  [NewObject, Pref="dom.mozTCPSocket.enabled", CheckAnyPermissions="tcp-socket"]
+  [NewObject, Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist"]
   readonly attribute LegacyMozTCPSocket mozTCPSocket;
 };
 
 #ifdef MOZ_EME
 partial interface Navigator {
   [Pref="media.eme.apiVisible", NewObject]
   Promise<MediaKeySystemAccess>
   requestMediaKeySystemAccess(DOMString keySystem,
--- a/dom/webidl/PermissionSettings.webidl
+++ b/dom/webidl/PermissionSettings.webidl
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain at http://mozilla.org/MPL/2.0/. */
 
 [JSImplementation="@mozilla.org/permissionSettings;1",
- CheckAnyPermissions="permissions",
+ ChromeOnly,
  Pref="dom.mozPermissionSettings.enabled",
  NavigatorProperty="mozPermissionSettings"]
 interface PermissionSettings
 {
   DOMString get(DOMString permission, DOMString manifestURI, DOMString origin, boolean browserFlag);
 
   void set(DOMString permission, DOMString value, DOMString manifestURI, DOMString origin, boolean browserFlag);
 
--- a/dom/webidl/PhoneNumberService.webidl
+++ b/dom/webidl/PhoneNumberService.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [JSImplementation="@mozilla.org/phoneNumberService;1",
  NavigatorProperty="mozPhoneNumberService",
- CheckAnyPermissions="phonenumberservice"]
+ ChromeOnly]
 interface PhoneNumberService {
   DOMRequest fuzzyMatch([TreatNullAs=EmptyString] optional DOMString number1 = "",
                         [TreatNullAs=EmptyString] optional DOMString number2= "");
 
   DOMString normalize(DOMString number);
 };
--- a/dom/webidl/PresentationDeviceInfoManager.webidl
+++ b/dom/webidl/PresentationDeviceInfoManager.webidl
@@ -8,17 +8,17 @@ dictionary PresentationDeviceInfo {
   DOMString id;
   DOMString name;
   DOMString type;
 };
 
 [NavigatorProperty="mozPresentationDeviceInfo",
  JSImplementation="@mozilla.org/presentation-device/deviceInfo;1",
  Pref="dom.presentation.enabled",
- CheckAnyPermissions="presentation-device-manage"]
+ ChromeOnly]
 interface PresentationDeviceInfoManager : EventTarget {
   // notify if any device updated.
   attribute EventHandler ondevicechange;
 
   // retrieve all available device infos
   Promise<sequence<PresentationDeviceInfo>> getAll();
 
   // Force all registered device provider to update device information.
--- a/dom/webidl/PresentationRequest.webidl
+++ b/dom/webidl/PresentationRequest.webidl
@@ -56,11 +56,11 @@ interface PresentationRequest : EventTar
    * "connected".
    *
    * The promise may be rejected duo to one of the following reasons:
    * - "OperationError": Unexpected error occurs.
    * - "NotFoundError":  No available device.
    * - "NetworkError":   Failed to establish the control channel or data channel.
    * - "TimeoutError":   Presenting page takes too long to load.
    */
-  [CheckAnyPermissions="presentation-device-manage", Throws]
+  [ChromeOnly, Throws]
   Promise<PresentationConnection> startWithDevice(DOMString deviceId);
 };
--- a/dom/webidl/ResourceStats.webidl
+++ b/dom/webidl/ResourceStats.webidl
@@ -1,38 +1,35 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
  Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
  JSImplementation="@mozilla.org/networkStatsData;1"]
 interface NetworkStatsData
 {
   readonly attribute unsigned long long   receivedBytes;
   readonly attribute unsigned long long   sentBytes;
   readonly attribute DOMTimeStamp         timestamp;      // timestamp of the record
 };
 
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
  Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
  JSImplementation="@mozilla.org/powerStatsData;1"]
 interface PowerStatsData
 {
   readonly attribute unsigned long long   consumedPower;  // unit: mW
   readonly attribute DOMTimeStamp         timestamp;      // timestamp of the record
 };
 
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
  Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
  JSImplementation="@mozilla.org/resourceStats;1"]
 interface ResourceStats
 {
   /**
    * Type of statistics/
    */
   readonly attribute ResourceType   type;
 
--- a/dom/webidl/ResourceStatsManager.webidl
+++ b/dom/webidl/ResourceStatsManager.webidl
@@ -65,19 +65,18 @@ dictionary ResourceStatsAlarmOptions
    *
    * |data| is used to reflect in the alarm object when the alarm is triggered.
    * |data| should be copied using the structured clone algorithm.
    */
   [EnforceRange] DOMTimeStamp   startTime;  // time in milliseconds since Epoch
   any                           data;
 };
 
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
  Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
  JSImplementation="@mozilla.org/resourceStatsAlarm;1"]
 interface ResourceStatsAlarm
 {
   /**
    * ID of the alarm
    */
   readonly attribute unsigned long          alarmId;
 
@@ -107,20 +106,19 @@ interface ResourceStatsAlarm
   readonly attribute unsigned long long     threshold;
 
   /**
    * |data| is used to reflect in the alarm object when the alarm is triggered.
    */
   readonly attribute any                    data;
 };
 
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
  Pref="dom.resource_stats.enabled",
  Constructor(ResourceType type),
- AvailableIn="CertifiedApps",
  JSImplementation="@mozilla.org/resourceStatsManager;1"]
 interface ResourceStatsManager
 {
   /**
    * Query resource statistics.
    *
    * |statsOptions| specifies the detail of statistics of interest.
    *
--- a/dom/webidl/SecureElement.webidl
+++ b/dom/webidl/SecureElement.webidl
@@ -32,18 +32,17 @@ dictionary SECommand {
   required octet p1;             // First Octet of Parameters Byte
   required octet p2;             // Second Octet of Parameters Byte
   sequence<octet>? data = null;  // Sequence of octets
   short le = -1;                 // The length of the expected
                                  // response data or -1 if none is expected
 };
 
 [Pref="dom.secureelement.enabled",
- CheckAnyPermissions="secureelement-manage",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  JSImplementation="@mozilla.org/secureelement/reader;1"]
 interface SEReader {
 
   // 'true' if a secure element is present
   readonly attribute boolean isSEPresent;
 
   // Type of SecureElement
   readonly attribute SEType type;
@@ -61,18 +60,17 @@ interface SEReader {
    * Closes all sessions associated with this Reader and its associated channels.
    *
    */
   [Throws]
   Promise<void> closeAll();
 };
 
 [Pref="dom.secureelement.enabled",
- CheckAnyPermissions="secureelement-manage",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  JSImplementation="@mozilla.org/secureelement/session;1"]
 interface SESession {
 
   // 'reader' that provides this session
   readonly attribute SEReader reader;
 
   // Status of current session
   readonly attribute boolean isClosed;
@@ -97,18 +95,17 @@ interface SESession {
    * Close all active channels associated with this session.
    *
    */
   [Throws]
   Promise<void> closeAll();
 };
 
 [Pref="dom.secureelement.enabled",
- CheckAnyPermissions="secureelement-manage",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  JSImplementation="@mozilla.org/secureelement/channel;1"]
 interface SEChannel {
 
   // 'session' obj this channel is bound to
   readonly attribute SESession session;
 
   // response to openBasicChannel / openLogicalChannel operation
   [Constant, Cached] readonly  attribute Uint8Array? openResponse;
@@ -137,18 +134,17 @@ interface SEChannel {
    * Closes the active channel.
    *
    */
   [Throws]
   Promise<void> close();
 };
 
 [Pref="dom.secureelement.enabled",
- CheckAnyPermissions="secureelement-manage",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  JSImplementation="@mozilla.org/secureelement/response;1"]
 interface SEResponse {
   // Response received on this 'channel' object.
   [Constant] readonly attribute SEChannel channel;
 
   // First octet of response's status word
   [Constant] readonly attribute octet        sw1;
 
--- a/dom/webidl/SecureElementManager.webidl
+++ b/dom/webidl/SecureElementManager.webidl
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
  /* Copyright © 2014 Deutsche Telekom, Inc. */
 
 [Pref="dom.secureelement.enabled",
- CheckAnyPermissions="secureelement-manage",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  JSImplementation="@mozilla.org/secureelement/manager;1",
  NavigatorProperty="seManager",
  NoInterfaceObject]
 interface SEManager {
 
   /**
    * Retrieves all the readers available on the device.
    *
--- a/dom/webidl/SettingsManager.webidl
+++ b/dom/webidl/SettingsManager.webidl
@@ -26,17 +26,17 @@ dictionary SettingChange {
   DOMString settingValue;
 };
 
 callback SettingChangeCallback = void (SettingChange setting);
 
 [JSImplementation="@mozilla.org/settingsManager;1",
  NavigatorProperty="mozSettings",
  Pref="dom.mozSettings.enabled",
- CheckAnyPermissions="settings-api-read settings-api-write"]
+ ChromeOnly]
 interface SettingsManager : EventTarget {
   SettingsLock createLock();
 
   void addObserver(DOMString name, SettingChangeCallback callback);
   void removeObserver(DOMString name, SettingChangeCallback callback);
 
   attribute EventHandler onsettingchange;
 };
--- a/dom/webidl/SimplePushManager.webidl
+++ b/dom/webidl/SimplePushManager.webidl
@@ -1,15 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 */
 
 [NavigatorProperty="push",
  JSImplementation="@mozilla.org/push/PushManager;1",
- CheckAnyPermissions="push",
+ ChromeOnly,
  Pref="services.push.enabled"]
 interface SimplePushManager {
     DOMRequest register();
     DOMRequest unregister(DOMString pushEndpoint);
     DOMRequest registrations();
 };
--- a/dom/webidl/SmsMessage.webidl
+++ b/dom/webidl/SmsMessage.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Pref="dom.sms.enabled",
- CheckAnyPermissions="sms",
- AvailableIn="CertifiedApps"]
+ ChromeOnly]
 interface SmsMessage {
   /**
    * |type| is always "sms".
    */
   readonly attribute DOMString type;
 
   /**
    * The id of the message record in the database.
--- a/dom/webidl/SystemUpdate.webidl
+++ b/dom/webidl/SystemUpdate.webidl
@@ -11,17 +11,17 @@ dictionary SystemUpdatePackageInfo {
   DOMString type = "";
   DOMString version = "";
   DOMString description = "";
   DOMTimeStamp buildDate = 0;
   unsigned long long size = 0;
 };
 
 [JSImplementation="@mozilla.org/system-update-provider;1",
- CheckAnyPermissions="system-update",
+ ChromeOnly,
  Pref="dom.system_update.enabled"]
 interface SystemUpdateProvider : EventTarget {
   readonly attribute DOMString name;
   readonly attribute DOMString uuid;
 
   attribute EventHandler onupdateavailable;
   attribute EventHandler onprogress;
   attribute EventHandler onupdateready;
@@ -32,17 +32,17 @@ interface SystemUpdateProvider : EventTa
   void stopDownload();
   void applyUpdate();
   boolean setParameter(DOMString name, DOMString value);
   DOMString getParameter(DOMString name);
 };
 
 [NavigatorProperty="updateManager",
  JSImplementation="@mozilla.org/system-update-manager;1",
- CheckAnyPermissions="system-update",
+ ChromeOnly,
  Pref="dom.system_update.enabled"]
 interface SystemUpdateManager {
   Promise<sequence<SystemUpdateProviderInfo>> getProviders();
 
   Promise<SystemUpdateProvider> setActiveProvider(DOMString uuid);
 
   Promise<SystemUpdateProvider> getActiveProvider();
 };
--- a/dom/webidl/TCPSocketErrorEvent.webidl
+++ b/dom/webidl/TCPSocketErrorEvent.webidl
@@ -4,18 +4,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Dispatched as part of the "error" event in the following situations:
 * - if there's an error detected when the TCPSocket closes
 * - if there's an internal error while sending data
 * - if there's an error connecting to the host
 */
 
-[Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
- Constructor(DOMString type, optional TCPSocketErrorEventInit eventInitDict),
+[Constructor(DOMString type, optional TCPSocketErrorEventInit eventInitDict),
+ Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
  Exposed=(Window,System)]
 interface TCPSocketErrorEvent : Event {
   readonly attribute DOMString name;
   readonly attribute DOMString message;
 };
 
 dictionary TCPSocketErrorEventInit : EventInit
 {
--- a/dom/webidl/TVChannel.webidl
+++ b/dom/webidl/TVChannel.webidl
@@ -13,17 +13,17 @@ enum TVChannelType {
   "data"
 };
 
 dictionary TVGetProgramsOptions {
   unsigned long long startTime;
   unsigned long long duration;
 };
 
-[Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+[Pref="dom.tv.enabled", ChromeOnly]
 interface TVChannel : EventTarget {
   [Throws]
   Promise<sequence<TVProgram>> getPrograms(optional TVGetProgramsOptions options);
 
   [Throws]
   Promise<TVProgram> getCurrentProgram();
 
   readonly attribute DOMString networkId;
--- a/dom/webidl/TVCurrentChannelChangedEvent.webidl
+++ b/dom/webidl/TVCurrentChannelChangedEvent.webidl
@@ -7,14 +7,13 @@
  * http://seanyhlin.github.io/TV-Manager-API/
  */
 
 dictionary TVCurrentChannelChangedEventInit : EventInit {
   TVChannel? channel = null;
 };
 
 [Pref="dom.tv.enabled",
- CheckAnyPermissions="tv",
- AvailableIn=CertifiedApps,
+ ChromeOnly,
  Constructor(DOMString type, optional TVCurrentChannelChangedEventInit eventInitDict)]
 interface TVCurrentChannelChangedEvent : Event {
   readonly attribute TVChannel? channel;
 };
--- a/dom/webidl/TVCurrentSourceChangedEvent.webidl
+++ b/dom/webidl/TVCurrentSourceChangedEvent.webidl
@@ -7,14 +7,13 @@
  * http://seanyhlin.github.io/TV-Manager-API/
  */
 
 dictionary TVCurrentSourceChangedEventInit : EventInit {
   TVSource? source = null;
 };
 
 [Pref="dom.tv.enabled",
- CheckAnyPermissions="tv",
- AvailableIn=CertifiedApps,
+ ChromeOnly,
  Constructor(DOMString type, optional TVCurrentSourceChangedEventInit eventInitDict)]
 interface TVCurrentSourceChangedEvent : Event {
   readonly attribute TVSource? source;
 };
--- a/dom/webidl/TVEITBroadcastedEvent.webidl
+++ b/dom/webidl/TVEITBroadcastedEvent.webidl
@@ -7,14 +7,13 @@
  * http://seanyhlin.github.io/TV-Manager-API/
  */
 
 dictionary TVEITBroadcastedEventInit : EventInit {
   sequence<TVProgram> programs = [];
 };
 
 [Pref="dom.tv.enabled",
- CheckAnyPermissions="tv",
- AvailableIn=CertifiedApps,
+ ChromeOnly,
  Constructor(DOMString type, optional TVEITBroadcastedEventInit eventInitDict)]
 interface TVEITBroadcastedEvent : Event {
   [Pure, Cached] readonly attribute sequence<TVProgram> programs;
 };
--- a/dom/webidl/TVManager.webidl
+++ b/dom/webidl/TVManager.webidl
@@ -2,13 +2,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://seanyhlin.github.io/TV-Manager-API/
  */
 
-[Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+[Pref="dom.tv.enabled", ChromeOnly]
 interface TVManager : EventTarget {
   [Throws]
   Promise<sequence<TVTuner>> getTuners();
 };
--- a/dom/webidl/TVProgram.webidl
+++ b/dom/webidl/TVProgram.webidl
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://seanyhlin.github.io/TV-Manager-API/
  */
 
-[Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+[Pref="dom.tv.enabled", ChromeOnly]
 interface TVProgram {
   sequence<DOMString> getAudioLanguages();
 
   sequence<DOMString> getSubtitleLanguages();
 
   readonly attribute DOMString eventId;
 
   readonly attribute TVChannel channel;
--- a/dom/webidl/TVScanningStateChangedEvent.webidl
+++ b/dom/webidl/TVScanningStateChangedEvent.webidl
@@ -15,15 +15,14 @@ enum TVScanningState {
 };
 
 dictionary TVScanningStateChangedEventInit : EventInit {
   TVScanningState state = "cleared";
   TVChannel? channel = null;
 };
 
 [Pref="dom.tv.enabled",
- CheckAnyPermissions="tv",
- AvailableIn=CertifiedApps,
+ ChromeOnly, 
  Constructor(DOMString type, optional TVScanningStateChangedEventInit eventInitDict)]
 interface TVScanningStateChangedEvent : Event {
   readonly attribute TVScanningState state;
   readonly attribute TVChannel? channel;
 };
--- a/dom/webidl/TVSource.webidl
+++ b/dom/webidl/TVSource.webidl
@@ -28,17 +28,17 @@ enum TVSourceType {
   "t-dmb",
   "s-dmb"
 };
 
 dictionary TVStartScanningOptions {
   boolean isRescanned;
 };
 
-[Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+[Pref="dom.tv.enabled", ChromeOnly]
 interface TVSource : EventTarget {
   [Throws]
   Promise<sequence<TVChannel>> getChannels();
 
   [Throws]
   Promise<void> setCurrentChannel(DOMString channelNumber);
 
   [Throws]
--- a/dom/webidl/TVTuner.webidl
+++ b/dom/webidl/TVTuner.webidl
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://seanyhlin.github.io/TV-Manager-API/
  */
 
-[Pref="dom.tv.enabled", CheckAnyPermissions="tv", AvailableIn=CertifiedApps]
+[Pref="dom.tv.enabled", ChromeOnly]
 interface TVTuner : EventTarget {
   [Throws]
   sequence<TVSourceType> getSupportedSourceTypes();
 
   [Throws]
   Promise<sequence<TVSource>> getSources();
 
   [Throws]
--- a/dom/webidl/Telephony.webidl
+++ b/dom/webidl/Telephony.webidl
@@ -46,18 +46,17 @@ interface Telephony : EventTarget {
   [Throws]
   void startTone(DOMString tone, optional unsigned long serviceId);
 
   [Throws]
   void stopTone(optional unsigned long serviceId);
 
   // Calling this method, the app will be treated as owner of the telephony
   // calls from the AudioChannel policy.
-  [Throws,
-   CheckAllPermissions="audio-channel-telephony"]
+  [Throws]
   void ownAudioChannel();
 
   [Throws]
   attribute boolean muted;
 
   [Throws]
   attribute boolean speakerEnabled;
 
--- a/dom/webidl/UDPMessageEvent.webidl
+++ b/dom/webidl/UDPMessageEvent.webidl
@@ -5,17 +5,17 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/raw-sockets/#interface-udpmessageevent
  */
 
 //Bug 1056444: This interface should be removed after UDPSocket.input/UDPSocket.output are ready.
 [Constructor(DOMString type, optional UDPMessageEventInit eventInitDict),
  Pref="dom.udpsocket.enabled",
- CheckAnyPermissions="udp-socket"]
+ ChromeOnly]
 interface UDPMessageEvent : Event {
     readonly    attribute DOMString      remoteAddress;
     readonly    attribute unsigned short remotePort;
     readonly    attribute any            data;
 };
 
 dictionary UDPMessageEventInit : EventInit {
   DOMString remoteAddress = "";
--- a/dom/webidl/UDPSocket.webidl
+++ b/dom/webidl/UDPSocket.webidl
@@ -14,17 +14,17 @@ dictionary UDPOptions {
     DOMString      remoteAddress;
     unsigned short remotePort;
     boolean        addressReuse = true;
     boolean        loopback = false;
 };
 
 [Constructor (optional UDPOptions options),
  Pref="dom.udpsocket.enabled",
- CheckAnyPermissions="udp-socket"]
+ ChromeOnly]
 interface UDPSocket : EventTarget {
     readonly    attribute DOMString?       localAddress;
     readonly    attribute unsigned short?  localPort;
     readonly    attribute DOMString?       remoteAddress;
     readonly    attribute unsigned short?  remotePort;
     readonly    attribute boolean          addressReuse;
     readonly    attribute boolean          loopback;
     readonly    attribute SocketReadyState readyState;
--- a/dom/webidl/USSDReceivedEvent.webidl
+++ b/dom/webidl/USSDReceivedEvent.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Pref="dom.telephony.enabled",
- CheckAnyPermissions="telephony",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  Constructor(DOMString type, optional USSDReceivedEventInit eventInitDict)]
 interface USSDReceivedEvent : Event
 {
   readonly attribute unsigned long serviceId;
   readonly attribute DOMString? message;
   readonly attribute USSDSession? session;  // null if session is ended.
 };
 
--- a/dom/webidl/USSDSession.webidl
+++ b/dom/webidl/USSDSession.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 [Pref="dom.telephony.enabled",
- CheckAnyPermissions="telephony",
- AvailableIn="CertifiedApps",
+ ChromeOnly,
  Constructor(unsigned long serviceId)]
 interface USSDSession {
   [NewObject]
   Promise<void> send(DOMString ussd);
 
   [NewObject]
   Promise<void> cancel();
 };