Bug 1006309 - Patch 1/4: Revise BluetoothManager2.webidl according to refined WebBluetooth API. r=bz
authorBen Tian <btian@mozilla.com>
Wed, 28 May 2014 10:21:59 +0800
changeset 186103 14a71f33287cce203237c6e589c835ab85be69c4
parent 186086 793cc44526723f0a72406164a9aaabb1fc467c0b
child 186104 81da11356628f8dfa2f24119828c9827eb7bd07c
push id26878
push userryanvm@gmail.com
push dateMon, 02 Jun 2014 21:09:02 +0000
treeherdermozilla-central@240184726d04 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1006309
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1006309 - Patch 1/4: Revise BluetoothManager2.webidl according to refined WebBluetooth API. r=bz
content/base/src/nsGkAtomList.h
dom/webidl/BluetoothManager2.webidl
--- a/content/base/src/nsGkAtomList.h
+++ b/content/base/src/nsGkAtomList.h
@@ -647,16 +647,17 @@ GK_ATOM(observes, "observes")
 GK_ATOM(odd, "odd")
 GK_ATOM(OFF, "OFF")
 GK_ATOM(ol, "ol")
 GK_ATOM(omitXmlDeclaration, "omit-xml-declaration")
 GK_ATOM(ona2dpstatuschanged, "ona2dpstatuschanged")
 GK_ATOM(onabort, "onabort")
 GK_ATOM(onactivate, "onactivate")
 GK_ATOM(onadapteradded, "onadapteradded")
+GK_ATOM(onadapterremoved, "onadapterremoved")
 GK_ATOM(onafterprint, "onafterprint")
 GK_ATOM(onafterscriptexecute, "onafterscriptexecute")
 GK_ATOM(onalerting, "onalerting")
 GK_ATOM(onanimationend, "onanimationend")
 GK_ATOM(onanimationiteration, "onanimationiteration")
 GK_ATOM(onanimationstart, "onanimationstart")
 GK_ATOM(onantennaavailablechange, "onantennaavailablechange")
 GK_ATOM(onAppCommand, "onAppCommand")
--- a/dom/webidl/BluetoothManager2.webidl
+++ b/dom/webidl/BluetoothManager2.webidl
@@ -1,18 +1,22 @@
 /* -*- 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/. */
 
-interface BluetoothManager : EventTarget {
-  [Throws]
-  readonly attribute boolean      enabled;
+[CheckPermissions="bluetooth"]
+interface BluetoothManager: EventTarget
+{
+  readonly attribute BluetoothAdapter? defaultAdapter;
 
-           attribute EventHandler onenabled;
-           attribute EventHandler ondisabled;
+           attribute EventHandler onattributechanged;
            attribute EventHandler onadapteradded;
+           attribute EventHandler onadapterremoved;
 
-  [Throws]
-  boolean     isConnected(unsigned short aProfile);
-  [NewObject, Throws]
-  DOMRequest? getDefaultAdapter();
+  sequence<BluetoothAdapter> getAdapters();
 };
+
+enum BluetoothManagerAttribute
+{
+  "unknown",
+  "defaultAdapter"
+};