diff --git a/content/base/src/nsGkAtomList.h b/content/base/src/nsGkAtomList.h index 6d1fc188fdaf..331ffa1ee638 100644 --- a/content/base/src/nsGkAtomList.h +++ b/content/base/src/nsGkAtomList.h @@ -704,6 +704,7 @@ GK_ATOM(ondisabled, "ondisabled") GK_ATOM(ondischargingtimechange, "ondischargingtimechange") GK_ATOM(ondisconnected, "ondisconnected") GK_ATOM(ondisconnecting, "ondisconnecting") +GK_ATOM(ondiscoverystatechanged, "ondiscoverystatechanged") GK_ATOM(ondownloading, "ondownloading") GK_ATOM(onDOMActivate, "onDOMActivate") GK_ATOM(onDOMAttrModified, "onDOMAttrModified") diff --git a/dom/bluetooth/BluetoothAdapter.h b/dom/bluetooth/BluetoothAdapter.h index cea5a1f22a57..11582aa44aa3 100644 --- a/dom/bluetooth/BluetoothAdapter.h +++ b/dom/bluetooth/BluetoothAdapter.h @@ -148,6 +148,7 @@ public: SendMediaPlayStatus(const MediaPlayStatus& aMediaPlayStatus, ErrorResult& aRv); IMPL_EVENT_HANDLER(devicefound); + IMPL_EVENT_HANDLER(discoverystatechanged); IMPL_EVENT_HANDLER(a2dpstatuschanged); IMPL_EVENT_HANDLER(hfpstatuschanged); IMPL_EVENT_HANDLER(pairedstatuschanged); diff --git a/dom/bluetooth/BluetoothCommon.h b/dom/bluetooth/BluetoothCommon.h index e0aa8f5f7517..4f93cc93572c 100644 --- a/dom/bluetooth/BluetoothCommon.h +++ b/dom/bluetooth/BluetoothCommon.h @@ -111,6 +111,11 @@ extern bool gBluetoothDebugFlag; */ #define PAIRED_STATUS_CHANGED_ID "pairedstatuschanged" +/** + * This event would be fired when discovery procedure starts or stops. + */ +#define DISCOVERY_STATE_CHANGED_ID "discoverystatechanged" + /** * When receiving a query about current play status from remote device, we'll * dispatch an event. diff --git a/dom/webidl/BluetoothAdapter.webidl b/dom/webidl/BluetoothAdapter.webidl index 68bcb7ffa241..f7897354f1a2 100644 --- a/dom/webidl/BluetoothAdapter.webidl +++ b/dom/webidl/BluetoothAdapter.webidl @@ -51,6 +51,9 @@ interface BluetoothAdapter : EventTarget { attribute EventHandler ondevicefound; + // Fired when discovery process has been done or has started + attribute EventHandler ondiscoverystatechanged; + // Fired when pairing process is completed attribute EventHandler onpairedstatuschanged;