Bug 864484 - Part 5: Build CellBroadcast by default. r=vyang, r=smaug, r=ted

--HG--
extra : rebase_source : 73dcc868004c3e34c51806a34f88d25fc6c4c7c6
This commit is contained in:
Bevis Tseng 2014-08-25 17:24:03 +08:00
parent a1fb9ea770
commit 0ce3edef4c
6 changed files with 17 additions and 20 deletions

View File

@ -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

View File

@ -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

View File

@ -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)
{

View File

@ -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<nsRefPtr<nsDOMDeviceStorage> >& 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<FMRadio> mFMRadio;
#endif
nsRefPtr<PowerManager> mPowerManager;
nsRefPtr<CellBroadcast> mCellBroadcast;
nsRefPtr<MobileMessageManager> mMobileMessageManager;
nsRefPtr<Telephony> mTelephony;
nsRefPtr<Voicemail> mVoicemail;
nsRefPtr<network::Connection> mConnection;
#ifdef MOZ_B2G_RIL
nsRefPtr<MobileConnectionArray> mMobileConnections;
nsRefPtr<CellBroadcast> mCellBroadcast;
nsRefPtr<IccManager> mIccManager;
#endif
#ifdef MOZ_B2G_BT

View File

@ -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',
]

View File

@ -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',