Skip to content

Commit

Permalink
Bug 1310020 - Remove DOM/bluetooth and related code. r=jst
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: IEhwzzBgb3x

--HG--
extra : rebase_source : 664e30c1d3babc71b2ef77c00e393fa767f4c159
  • Loading branch information
Michelangelo De Simone committed Oct 28, 2016
1 parent 09ab00a commit 6314d37
Show file tree
Hide file tree
Showing 216 changed files with 4 additions and 75,867 deletions.
7 changes: 0 additions & 7 deletions b2g/app/b2g.js
Original file line number Diff line number Diff line change
Expand Up @@ -1000,13 +1000,6 @@ pref("layers.compositor-lru-size", 10);
// In B2G by deafult any AudioChannelAgent is muted when created.
pref("dom.audiochannel.mutedByDefault", true);

// The app origin of bluetooth app, which is responsible for listening pairing
// requests.
pref("dom.bluetooth.app-origin", "app://bluetooth.gaiamobile.org");

// Enable W3C WebBluetooth API and disable B2G only GATT client API.
pref("dom.bluetooth.webbluetooth.enabled", false);

// Default device name for Presentation API
pref("dom.presentation.device.name", "Firefox OS");

Expand Down
3 changes: 0 additions & 3 deletions b2g/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@
#ifdef MOZ_B2G_RIL
@RESPATH@/components/dom_mobileconnection.xpt
#endif
#ifdef MOZ_B2G_BT
@RESPATH@/components/dom_bluetooth.xpt
#endif
@RESPATH@/components/dom_canvas.xpt
@RESPATH@/components/dom_contacts.xpt
@RESPATH@/components/dom_core.xpt
Expand Down
3 changes: 0 additions & 3 deletions browser/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@
@RESPATH@/components/dom_apps.xpt
@RESPATH@/components/dom_base.xpt
@RESPATH@/components/dom_system.xpt
#ifdef MOZ_B2G_BT
@RESPATH@/components/dom_bluetooth.xpt
#endif
@RESPATH@/components/dom_canvas.xpt
@RESPATH@/components/dom_core.xpt
@RESPATH@/components/dom_css.xpt
Expand Down
5 changes: 0 additions & 5 deletions dom/apps/PermissionsTable.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@ this.PermissionsTable = { geolocation: {
privileged: DENY_ACTION,
certified: ALLOW_ACTION
},
bluetooth: {
app: DENY_ACTION,
privileged: DENY_ACTION,
certified: ALLOW_ACTION
},
mobileconnection: {
app: DENY_ACTION,
privileged: DENY_ACTION,
Expand Down
13 changes: 0 additions & 13 deletions dom/base/DOMException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,6 @@ enum DOM4ErrorTypeCodeMap {
/* WebCrypto errors https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#dfn-DataError */
OperationError = 0,

/* Bluetooth API errors */
BtFailError = 0,
BtNotReadyError = 0,
BtNoMemError = 0,
BtBusyError = 0,
BtDoneError = 0,
BtUnsupportedError = 0,
BtParmInvalidError = 0,
BtUnhandledError = 0,
BtAuthFailureError = 0,
BtRmtDevDownError = 0,
BtAuthRejectedError = 0,

/* Push API errors */
NotAllowedError = 0,
};
Expand Down
28 changes: 0 additions & 28 deletions dom/base/Navigator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@

#include "mozilla/dom/MediaDevices.h"
#include "MediaManager.h"
#ifdef MOZ_B2G_BT
#include "BluetoothManager.h"
#endif

#ifdef MOZ_AUDIO_CHANNEL_MANAGER
#include "AudioChannelManager.h"
Expand Down Expand Up @@ -221,9 +218,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Navigator)
#ifdef MOZ_B2G_RIL
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMobileConnections)
#endif
#ifdef MOZ_B2G_BT
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBluetooth)
#endif
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mAudioChannelManager)
#endif
Expand Down Expand Up @@ -304,12 +298,6 @@ Navigator::Invalidate()
}
#endif

#ifdef MOZ_B2G_BT
if (mBluetooth) {
mBluetooth = nullptr;
}
#endif

mMediaDevices = nullptr;

#ifdef MOZ_AUDIO_CHANNEL_MANAGER
Expand Down Expand Up @@ -1800,22 +1788,6 @@ Navigator::GetConnection(ErrorResult& aRv)
return mConnection;
}

#ifdef MOZ_B2G_BT
bluetooth::BluetoothManager*
Navigator::GetMozBluetooth(ErrorResult& aRv)
{
if (!mBluetooth) {
if (!mWindow) {
aRv.Throw(NS_ERROR_UNEXPECTED);
return nullptr;
}
mBluetooth = bluetooth::BluetoothManager::Create(mWindow);
}

return mBluetooth;
}
#endif //MOZ_B2G_BT

#ifdef MOZ_TIME_MANAGER
time::TimeManager*
Navigator::GetMozTime(ErrorResult& aRv)
Expand Down
12 changes: 0 additions & 12 deletions dom/base/Navigator.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ namespace network {
class Connection;
} // namespace network

#ifdef MOZ_B2G_BT
namespace bluetooth {
class BluetoothManager;
} // namespace bluetooth
#endif // MOZ_B2G_BT

#ifdef MOZ_B2G_RIL
class MobileConnectionArray;
#endif
Expand Down Expand Up @@ -235,9 +229,6 @@ class Navigator final : public nsIDOMNavigator
#endif // MOZ_GAMEPAD
already_AddRefed<Promise> GetVRDisplays(ErrorResult& aRv);
void GetActiveVRDisplays(nsTArray<RefPtr<VRDisplay>>& aDisplays) const;
#ifdef MOZ_B2G_BT
bluetooth::BluetoothManager* GetMozBluetooth(ErrorResult& aRv);
#endif // MOZ_B2G_BT
#ifdef MOZ_TIME_MANAGER
time::TimeManager* GetMozTime(ErrorResult& aRv);
#endif // MOZ_TIME_MANAGER
Expand Down Expand Up @@ -326,9 +317,6 @@ class Navigator final : public nsIDOMNavigator
#ifdef MOZ_B2G_RIL
RefPtr<MobileConnectionArray> mMobileConnections;
#endif
#ifdef MOZ_B2G_BT
RefPtr<bluetooth::BluetoothManager> mBluetooth;
#endif
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
RefPtr<system::AudioChannelManager> mAudioChannelManager;
#endif
Expand Down
13 changes: 0 additions & 13 deletions dom/base/domerr.msg
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,6 @@ DOM_MSG_DEF(NS_ERROR_DOM_QUOTA_REACHED, "Persistent storage maximum size reached
DOM4_MSG_DEF(NotFoundError, "File was not found", NS_ERROR_DOM_FILE_NOT_FOUND_ERR)
DOM4_MSG_DEF(NotReadableError, "File could not be read", NS_ERROR_DOM_FILE_NOT_READABLE_ERR)

/* Non-standard Bluetooth DOM errors. */
DOM4_MSG_DEF(BtFailError, "Fail", NS_ERROR_DOM_BLUETOOTH_FAIL)
DOM4_MSG_DEF(BtNotReadyError, "Not ready", NS_ERROR_DOM_BLUETOOTH_NOT_READY)
DOM4_MSG_DEF(BtNoMemError, "No memory", NS_ERROR_DOM_BLUETOOTH_NOMEM)
DOM4_MSG_DEF(BtBusyError, "Device busy with another command", NS_ERROR_DOM_BLUETOOTH_BUSY)
DOM4_MSG_DEF(BtDoneError, "Request already done", NS_ERROR_DOM_BLUETOOTH_DONE)
DOM4_MSG_DEF(BtUnsupportedError, "Unsupported", NS_ERROR_DOM_BLUETOOTH_UNSUPPORTED)
DOM4_MSG_DEF(BtParmInvalidError, "Invalid parameter", NS_ERROR_DOM_BLUETOOTH_PARM_INVALID)
DOM4_MSG_DEF(BtUnhandledError, "Unhandled", NS_ERROR_DOM_BLUETOOTH_UNHANDLED)
DOM4_MSG_DEF(BtAuthFailureError, "Authentication failure", NS_ERROR_DOM_BLUETOOTH_AUTH_FAILURE)
DOM4_MSG_DEF(BtRmtDevDownError, "Remote device down", NS_ERROR_DOM_BLUETOOTH_RMT_DEV_DOWN)
DOM4_MSG_DEF(BtAuthRejectedError, "Authentication rejected", NS_ERROR_DOM_BLUETOOTH_AUTH_REJECTED)

/* Web Animations errors */

DOM4_MSG_DEF(NotSupportedError, "Animation to or from an underlying value is not yet supported.", NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR)
Expand Down
2 changes: 0 additions & 2 deletions dom/base/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,6 @@ EXTRA_JS_MODULES += [

LOCAL_INCLUDES += [
'../battery',
'../bluetooth/common',
'../bluetooth/common/webapi',
'../events',
'../media',
'../network',
Expand Down
69 changes: 0 additions & 69 deletions dom/bindings/Bindings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -107,75 +107,6 @@ DOMInterfaces = {
'headerFile': 'BatteryManager.h'
},

'BluetoothAdapter': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothAdapter',
},

'BluetoothClassOfDevice': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothClassOfDevice',
},

'BluetoothDevice': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothDevice',
},

'BluetoothDiscoveryHandle': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothDiscoveryHandle',
},

'BluetoothGatt': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothGatt',
},

'BluetoothGattAttributeEvent': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothGattAttributeEvent',
},

'BluetoothGattCharacteristic': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothGattCharacteristic',
},

'BluetoothGattDescriptor': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothGattDescriptor',
},

'BluetoothGattServer': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothGattServer',
},

'BluetoothGattService': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothGattService',
},

'BluetoothLeDeviceEvent': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothLeDeviceEvent',
},

'BluetoothManager': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothManager',
},

'BluetoothObexAuthHandle': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothObexAuthHandle',
},

'BluetoothPairingHandle': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothPairingHandle',
},

'BluetoothPairingListener': {
'nativeType':
'mozilla::dom::bluetooth::BluetoothPairingListener',
},

'BluetoothPbapRequestHandle': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothPbapRequestHandle',
},

'BluetoothMapRequestHandle': {
'nativeType': 'mozilla::dom::bluetooth::BluetoothMapRequestHandle',
},

'BoxObject': {
'resultNotAddRefed': ['element'],
},
Expand Down
1 change: 0 additions & 1 deletion dom/bindings/Exceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ CreateException(JSContext* aCx, nsresult aRv, const nsACString& aMessage)
case NS_ERROR_MODULE_DOM_XPATH:
case NS_ERROR_MODULE_DOM_INDEXEDDB:
case NS_ERROR_MODULE_DOM_FILEHANDLE:
case NS_ERROR_MODULE_DOM_BLUETOOTH:
case NS_ERROR_MODULE_DOM_ANIM:
case NS_ERROR_MODULE_DOM_PUSH:
case NS_ERROR_MODULE_DOM_MEDIA:
Expand Down
1 change: 0 additions & 1 deletion dom/bindings/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ LOCAL_INCLUDES += [
LOCAL_INCLUDES += [
'/dom/base',
'/dom/battery',
'/dom/bluetooth/common/webapi',
'/dom/canvas',
'/dom/geolocation',
'/dom/html',
Expand Down
Loading

0 comments on commit 6314d37

Please sign in to comment.