Bug 956655 - Part 2: Move MobileConnection DOM classes to namespacing mozilla::dom. r=smaug

This commit is contained in:
Edgar Chen 2014-01-02 11:06:17 +08:00
parent 5284ea1427
commit 448b8bc80d
8 changed files with 12 additions and 18 deletions

View File

@ -40,7 +40,7 @@
#ifdef MOZ_B2G_RIL #ifdef MOZ_B2G_RIL
#include "mozilla/dom/IccManager.h" #include "mozilla/dom/IccManager.h"
#include "mozilla/dom/CellBroadcast.h" #include "mozilla/dom/CellBroadcast.h"
#include "mozilla/dom/network/MobileConnectionArray.h" #include "mozilla/dom/MobileConnectionArray.h"
#include "mozilla/dom/Voicemail.h" #include "mozilla/dom/Voicemail.h"
#endif #endif
#include "nsIIdleObserver.h" #include "nsIIdleObserver.h"
@ -1180,7 +1180,7 @@ Navigator::GetMozTelephony(ErrorResult& aRv)
#ifdef MOZ_B2G_RIL #ifdef MOZ_B2G_RIL
network::MobileConnectionArray* MobileConnectionArray*
Navigator::GetMozMobileConnections(ErrorResult& aRv) Navigator::GetMozMobileConnections(ErrorResult& aRv)
{ {
if (!mMobileConnections) { if (!mMobileConnections) {
@ -1188,7 +1188,7 @@ Navigator::GetMozMobileConnections(ErrorResult& aRv)
aRv.Throw(NS_ERROR_UNEXPECTED); aRv.Throw(NS_ERROR_UNEXPECTED);
return nullptr; return nullptr;
} }
mMobileConnections = new network::MobileConnectionArray(mWindow); mMobileConnections = new MobileConnectionArray(mWindow);
} }
return mMobileConnections; return mMobileConnections;

View File

@ -72,9 +72,6 @@ class MozGetUserMediaDevicesSuccessCallback;
namespace network { namespace network {
class Connection; class Connection;
#ifdef MOZ_B2G_RIL
class MobileConnectionArray;
#endif
} // namespace Connection; } // namespace Connection;
#ifdef MOZ_B2G_BT #ifdef MOZ_B2G_BT
@ -86,6 +83,7 @@ class BluetoothManager;
#ifdef MOZ_B2G_RIL #ifdef MOZ_B2G_RIL
class CellBroadcast; class CellBroadcast;
class IccManager; class IccManager;
class MobileConnectionArray;
class Voicemail; class Voicemail;
#endif #endif
@ -202,7 +200,7 @@ public:
ErrorResult& aRv); ErrorResult& aRv);
bool MozHasPendingMessage(const nsAString& aType, ErrorResult& aRv); bool MozHasPendingMessage(const nsAString& aType, ErrorResult& aRv);
#ifdef MOZ_B2G_RIL #ifdef MOZ_B2G_RIL
network::MobileConnectionArray* GetMozMobileConnections(ErrorResult& aRv); MobileConnectionArray* GetMozMobileConnections(ErrorResult& aRv);
CellBroadcast* GetMozCellBroadcast(ErrorResult& aRv); CellBroadcast* GetMozCellBroadcast(ErrorResult& aRv);
Voicemail* GetMozVoicemail(ErrorResult& aRv); Voicemail* GetMozVoicemail(ErrorResult& aRv);
nsIDOMMozIccManager* GetMozIccManager(ErrorResult& aRv); nsIDOMMozIccManager* GetMozIccManager(ErrorResult& aRv);
@ -318,7 +316,7 @@ private:
nsRefPtr<Telephony> mTelephony; nsRefPtr<Telephony> mTelephony;
nsRefPtr<network::Connection> mConnection; nsRefPtr<network::Connection> mConnection;
#ifdef MOZ_B2G_RIL #ifdef MOZ_B2G_RIL
nsRefPtr<network::MobileConnectionArray> mMobileConnections; nsRefPtr<MobileConnectionArray> mMobileConnections;
nsRefPtr<CellBroadcast> mCellBroadcast; nsRefPtr<CellBroadcast> mCellBroadcast;
nsRefPtr<IccManager> mIccManager; nsRefPtr<IccManager> mIccManager;
nsRefPtr<Voicemail> mVoicemail; nsRefPtr<Voicemail> mVoicemail;

View File

@ -809,7 +809,7 @@ DOMInterfaces = {
}, },
'MozMobileConnectionArray': { 'MozMobileConnectionArray': {
'nativeType': 'mozilla::dom::network::MobileConnectionArray', 'nativeType': 'mozilla::dom::MobileConnectionArray',
'resultNotAddRefed': [ 'item' ] 'resultNotAddRefed': [ 'item' ]
}, },

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * 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/. */ * You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/network/MobileConnection.h" #include "mozilla/dom/MobileConnection.h"
#include "GeneratedEvents.h" #include "GeneratedEvents.h"
#include "mozilla/dom/CFStateChangeEvent.h" #include "mozilla/dom/CFStateChangeEvent.h"
@ -23,7 +23,7 @@
#define NS_RILCONTENTHELPER_CONTRACTID "@mozilla.org/ril/content-helper;1" #define NS_RILCONTENTHELPER_CONTRACTID "@mozilla.org/ril/content-helper;1"
using namespace mozilla::dom::network; using namespace mozilla::dom;
class MobileConnection::Listener MOZ_FINAL : public nsIMobileConnectionListener class MobileConnection::Listener MOZ_FINAL : public nsIMobileConnectionListener
{ {

View File

@ -13,7 +13,6 @@
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
namespace network {
class MobileConnection : public nsDOMEventTargetHelper class MobileConnection : public nsDOMEventTargetHelper
, public nsIDOMMozMobileConnection , public nsIDOMMozMobileConnection
@ -53,7 +52,6 @@ private:
bool CheckPermission(const char* aType); bool CheckPermission(const char* aType);
}; };
} // namespace network
} // namespace dom } // namespace dom
} // namespace mozilla } // namespace mozilla

View File

@ -8,7 +8,7 @@
#include "mozilla/dom/MozMobileConnectionArrayBinding.h" #include "mozilla/dom/MozMobileConnectionArrayBinding.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
using namespace mozilla::dom::network; using namespace mozilla::dom;
NS_IMPL_CYCLE_COLLECTION_CLASS(MobileConnectionArray) NS_IMPL_CYCLE_COLLECTION_CLASS(MobileConnectionArray)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(MobileConnectionArray) NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(MobileConnectionArray)

View File

@ -8,13 +8,12 @@
#define mozilla_dom_network_MobileConnectionArray_h__ #define mozilla_dom_network_MobileConnectionArray_h__
#include "nsWrapperCache.h" #include "nsWrapperCache.h"
#include "mozilla/dom/network/MobileConnection.h" #include "mozilla/dom/MobileConnection.h"
class nsIDOMMozMobileConnection; class nsIDOMMozMobileConnection;
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
namespace network {
class MobileConnectionArray MOZ_FINAL : public nsISupports, class MobileConnectionArray MOZ_FINAL : public nsISupports,
public nsWrapperCache public nsWrapperCache
@ -57,7 +56,6 @@ private:
nsTArray<nsRefPtr<MobileConnection>> mMobileConnections; nsTArray<nsRefPtr<MobileConnection>> mMobileConnections;
}; };
} // namespace network
} // namespace dom } // namespace dom
} // namespace mozilla } // namespace mozilla

View File

@ -4,7 +4,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS.mozilla.dom.network += [ EXPORTS.mozilla.dom += [
'MobileConnection.h', 'MobileConnection.h',
'MobileConnectionArray.h', 'MobileConnectionArray.h',
] ]