diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in index 30216346a92b..c08bf4585052 100644 --- a/b2g/installer/package-manifest.in +++ b/b2g/installer/package-manifest.in @@ -160,7 +160,6 @@ #endif #ifdef MOZ_B2G_RIL @BINPATH@/components/dom_icc.xpt -@BINPATH@/components/dom_cellbroadcast.xpt @BINPATH@/components/dom_wappush.xpt @BINPATH@/components/dom_mobileconnection.xpt #endif @@ -192,6 +191,7 @@ @BINPATH@/components/dom_settings.xpt @BINPATH@/components/dom_permissionsettings.xpt @BINPATH@/components/dom_sidebar.xpt +@BINPATH@/components/dom_cellbroadcast.xpt @BINPATH@/components/dom_mobilemessage.xpt @BINPATH@/components/dom_storage.xpt @BINPATH@/components/dom_stylesheets.xpt diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 5f6bb76cc762..ab98809b6c90 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -206,6 +206,7 @@ @BINPATH@/components/dom_settings.xpt @BINPATH@/components/dom_permissionsettings.xpt @BINPATH@/components/dom_sidebar.xpt +@BINPATH@/components/dom_cellbroadcast.xpt @BINPATH@/components/dom_mobilemessage.xpt @BINPATH@/components/dom_storage.xpt @BINPATH@/components/dom_stylesheets.xpt diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index c9c260fe90a1..7d8d3da6f95c 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -33,6 +33,7 @@ #include "mozilla/dom/PowerManager.h" #include "mozilla/dom/WakeLock.h" #include "mozilla/dom/power/PowerManagerService.h" +#include "mozilla/dom/CellBroadcast.h" #include "mozilla/dom/MobileMessageManager.h" #include "mozilla/dom/ServiceWorkerContainer.h" #include "mozilla/dom/Telephony.h" @@ -49,7 +50,6 @@ #endif #ifdef MOZ_B2G_RIL #include "mozilla/dom/IccManager.h" -#include "mozilla/dom/CellBroadcast.h" #include "mozilla/dom/MobileConnectionArray.h" #endif #include "nsIIdleObserver.h" @@ -173,13 +173,13 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Navigator) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mNotification) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBatteryManager) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPowerManager) + NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCellBroadcast) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMobileMessageManager) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTelephony) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mVoicemail) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mConnection) #ifdef MOZ_B2G_RIL NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMobileConnections) - NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCellBroadcast) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIccManager) #endif #ifdef MOZ_B2G_BT @@ -242,6 +242,10 @@ Navigator::Invalidate() mPowerManager = nullptr; } + if (mCellBroadcast) { + mCellBroadcast = nullptr; + } + if (mMobileMessageManager) { mMobileMessageManager->Shutdown(); mMobileMessageManager = nullptr; @@ -266,10 +270,6 @@ Navigator::Invalidate() mMobileConnections = nullptr; } - if (mCellBroadcast) { - mCellBroadcast = nullptr; - } - if (mIccManager) { mIccManager->Shutdown(); mIccManager = nullptr; @@ -1495,7 +1495,7 @@ Navigator::HasFeature(const nsAString& aName, ErrorResult& aRv) p->MaybeResolve(true); return p.forget(); } -#endif +#endif if (featureName.EqualsLiteral("XMLHttpRequest.mozSystem")) { p->MaybeResolve(true); @@ -1638,6 +1638,8 @@ Navigator::GetMozMobileConnections(ErrorResult& aRv) return mMobileConnections; } +#endif // MOZ_B2G_RIL + CellBroadcast* Navigator::GetMozCellBroadcast(ErrorResult& aRv) { @@ -1652,8 +1654,6 @@ Navigator::GetMozCellBroadcast(ErrorResult& aRv) return mCellBroadcast; } -#endif // MOZ_B2G_RIL - Voicemail* Navigator::GetMozVoicemail(ErrorResult& aRv) { diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h index 496d6db8124f..9cc8364a4413 100644 --- a/dom/base/Navigator.h +++ b/dom/base/Navigator.h @@ -85,12 +85,12 @@ class BluetoothManager; #endif // MOZ_B2G_BT #ifdef MOZ_B2G_RIL -class CellBroadcast; class IccManager; class MobileConnectionArray; #endif class PowerManager; +class CellBroadcast; class Telephony; class Voicemail; @@ -219,6 +219,7 @@ public: nsTArray >& aStores, ErrorResult& aRv); DesktopNotificationCenter* GetMozNotification(ErrorResult& aRv); + CellBroadcast* GetMozCellBroadcast(ErrorResult& aRv); MobileMessageManager* GetMozMobileMessage(); Telephony* GetMozTelephony(ErrorResult& aRv); Voicemail* GetMozVoicemail(ErrorResult& aRv); @@ -234,7 +235,6 @@ public: #endif #ifdef MOZ_B2G_RIL MobileConnectionArray* GetMozMobileConnections(ErrorResult& aRv); - CellBroadcast* GetMozCellBroadcast(ErrorResult& aRv); IccManager* GetMozIccManager(ErrorResult& aRv); #endif // MOZ_B2G_RIL #ifdef MOZ_GAMEPAD @@ -329,13 +329,13 @@ private: nsRefPtr mFMRadio; #endif nsRefPtr mPowerManager; + nsRefPtr mCellBroadcast; nsRefPtr mMobileMessageManager; nsRefPtr mTelephony; nsRefPtr mVoicemail; nsRefPtr mConnection; #ifdef MOZ_B2G_RIL nsRefPtr mMobileConnections; - nsRefPtr mCellBroadcast; nsRefPtr mIccManager; #endif #ifdef MOZ_B2G_BT diff --git a/dom/moz.build b/dom/moz.build index a5181d0b14eb..d132aab1a026 100644 --- a/dom/moz.build +++ b/dom/moz.build @@ -46,6 +46,7 @@ DIRS += [ 'battery', 'browser-element', 'canvas', + 'cellbroadcast', 'contacts', 'crypto', 'phonenumberutils', @@ -112,7 +113,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': if CONFIG['MOZ_B2G_RIL']: DIRS += [ 'icc', - 'cellbroadcast', 'wappush', ] diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build index 6fb286d36f97..b9cd7726dd97 100644 --- a/dom/webidl/moz.build +++ b/dom/webidl/moz.build @@ -264,6 +264,7 @@ WEBIDL_FILES = [ 'MouseEvent.webidl', 'MouseScrollEvent.webidl', 'MozActivity.webidl', + 'MozCellBroadcast.webidl', 'MozCellBroadcastMessage.webidl', 'MozMmsMessage.webidl', 'MozMobileCellInfo.webidl', @@ -605,7 +606,6 @@ if CONFIG['MOZ_B2G_BT']: if CONFIG['MOZ_B2G_RIL']: WEBIDL_FILES += [ 'IccCardLockError.webidl', - 'MozCellBroadcast.webidl', 'MozIcc.webidl', 'MozIccManager.webidl', ] @@ -662,6 +662,7 @@ GENERATED_EVENTS_WEBIDL_FILES = [ 'MediaStreamEvent.webidl', 'MediaStreamTrackEvent.webidl', 'MozApplicationEvent.webidl', + 'MozCellBroadcastEvent.webidl', 'MozClirModeEvent.webidl', 'MozContactChangeEvent.webidl', 'MozEmergencyCbModeEvent.webidl', @@ -724,11 +725,6 @@ if CONFIG['MOZ_B2G_BT']: 'BluetoothStatusChangedEvent.webidl', ] -if CONFIG['MOZ_B2G_RIL']: - GENERATED_EVENTS_WEBIDL_FILES += [ - 'MozCellBroadcastEvent.webidl', - ] - if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': GENERATED_EVENTS_WEBIDL_FILES += [ 'MozWifiConnectionInfoEvent.webidl',