Bug 1286530 - Turn Bluetooth-related APIs to ChromeOnly draft
authorAlexandre Lissy <lissyx@lissyx.dyndns.org>
Fri, 22 Apr 2016 11:38:52 +0200
changeset 387245 e4682f657b74cac9f42386be2ba95eb6f5e683e2
parent 387244 1a92cd70bc298b3cfc8daee3e44d1e0e37f44fd2
child 387246 ecdf54a8afa41108d2214ea84ce6f93d37dfbc3d
push id22914
push userbmo:lissyx+mozillians@lissyx.dyndns.org
push dateWed, 13 Jul 2016 15:39:24 +0000
bugs1286530
milestone50.0a1
Bug 1286530 - Turn Bluetooth-related APIs to ChromeOnly MozReview-Commit-ID: 5rCY03CLBaG
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/Navigator.webidl
--- 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/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -341,17 +341,17 @@ 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]
   readonly attribute FMRadio mozFMRadio;