Bug 735017: Clean up namespaces and naming for gonk dom objects in gonk specific code - Patch 2: Change mozilla::dom::telephony to mozilla::dom::gonk for dom/system/gonk objects; r=bent
authorKyle Machulis <kyle@nonpolynomial.com>
Wed, 14 Mar 2012 15:43:26 -0700
changeset 89414 a03c71163d1846c28b073d139f2e2f08134c7f28
parent 89413 495ed7337159db0d42eb631caf91f96bb3c68dba
child 89415 f767da72d616cf991b66a8c0df3e7403574d5598
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbent
bugs735017
milestone14.0a1
Bug 735017: Clean up namespaces and naming for gonk dom objects in gonk specific code - Patch 2: Change mozilla::dom::telephony to mozilla::dom::gonk for dom/system/gonk objects; r=bent
dom/sms/src/ril/SmsService.cpp
dom/system/gonk/AudioManager.cpp
dom/system/gonk/AudioManager.h
dom/system/gonk/SystemWorkerManager.cpp
dom/system/gonk/SystemWorkerManager.h
dom/telephony/Telephony.cpp
layout/build/nsLayoutModule.cpp
--- a/dom/sms/src/ril/SmsService.cpp
+++ b/dom/sms/src/ril/SmsService.cpp
@@ -36,17 +36,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "mozilla/dom/sms/SmsMessage.h"
 #include "SmsService.h"
 #include "SystemWorkerManager.h"
 #include "jsapi.h"
 #include "nsIInterfaceRequestorUtils.h"
 
-using mozilla::dom::telephony::SystemWorkerManager;
+using mozilla::dom::gonk::SystemWorkerManager;
 
 namespace mozilla {
 namespace dom {
 namespace sms {
 
 NS_IMPL_ISUPPORTS1(SmsService, nsISmsService)
 
 SmsService::SmsService()
--- a/dom/system/gonk/AudioManager.cpp
+++ b/dom/system/gonk/AudioManager.cpp
@@ -33,17 +33,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "AudioManager.h"
 #include <media/AudioSystem.h>
 
-using namespace mozilla::dom::telephony;
+using namespace mozilla::dom::gonk;
 using namespace android;
 
 NS_IMPL_ISUPPORTS1(AudioManager, nsIAudioManager)
 
 NS_IMETHODIMP
 AudioManager::GetMicrophoneMuted(bool* aMicrophoneMuted)
 {
   if (AudioSystem::isMicrophoneMuted(aMicrophoneMuted)) {
--- a/dom/system/gonk/AudioManager.h
+++ b/dom/system/gonk/AudioManager.h
@@ -43,17 +43,17 @@
 
 // {b2b51423-502d-4d77-89b3-7786b562b084}
 #define NS_AUDIOMANAGER_CID {0x94f6fd70, 0x7615, 0x4af9, \
       {0x89, 0x10, 0xf9, 0x3c, 0x55, 0xe6, 0x62, 0xec}}
 #define NS_AUDIOMANAGER_CONTRACTID "@mozilla.org/telephony/audiomanager;1"
 
 namespace mozilla {
 namespace dom {
-namespace telephony {
+namespace gonk {
 
 class AudioManager : public nsIAudioManager
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIAUDIOMANAGER
 
   AudioManager() : mPhoneState(PHONE_STATE_CURRENT)
--- a/dom/system/gonk/SystemWorkerManager.cpp
+++ b/dom/system/gonk/SystemWorkerManager.cpp
@@ -50,18 +50,19 @@
 #include "mozilla/dom/workers/Workers.h"
 #include "mozilla/ipc/Ril.h"
 #include "nsContentUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 #include "nsRadioInterfaceLayer.h"
 #include "nsWifiWorker.h"
 
-USING_TELEPHONY_NAMESPACE
+
 USING_WORKERS_NAMESPACE
+using namespace mozilla::dom::gonk;
 using namespace mozilla::ipc;
 
 namespace {
 
 NS_DEFINE_CID(kRadioInterfaceLayerCID, NS_RADIOINTERFACELAYER_CID);
 NS_DEFINE_CID(kWifiWorkerCID, NS_WIFIWORKER_CID);
 
 // Doesn't carry a reference, we're owned by services.
--- a/dom/system/gonk/SystemWorkerManager.h
+++ b/dom/system/gonk/SystemWorkerManager.h
@@ -35,24 +35,30 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef mozilla_dom_system_b2g_systemworkermanager_h__
 #define mozilla_dom_system_b2g_systemworkermanager_h__
 
-#include "TelephonyCommon.h"
-
 #include "nsIInterfaceRequestor.h"
 #include "nsIObserver.h"
+#include "nsAutoPtr.h"
+#include "nsCOMPtr.h"
+#include "nsDebug.h"
+#include "nsDOMEventTargetHelper.h"
+#include "nsStringGlue.h"
+#include "nsTArray.h"
 
 class nsIWorkerHolder;
 
-BEGIN_TELEPHONY_NAMESPACE
+namespace mozilla {
+namespace dom {
+namespace gonk {
 
 class SystemWorkerManager : public nsIObserver,
                             public nsIInterfaceRequestor
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIINTERFACEREQUESTOR
@@ -74,11 +80,13 @@ private:
   nsresult InitWifi(JSContext *cx);
 
   nsCOMPtr<nsIWorkerHolder> mRILWorker;
   nsCOMPtr<nsIWorkerHolder> mWifiWorker;
 
   bool mShutdown;
 };
 
-END_TELEPHONY_NAMESPACE
+}
+}
+}
 
 #endif // mozilla_dom_system_b2g_systemworkermanager_h__
--- a/dom/telephony/Telephony.cpp
+++ b/dom/telephony/Telephony.cpp
@@ -53,16 +53,17 @@
 #include "nsNetUtil.h"
 #include "nsServiceManagerUtils.h"
 #include "SystemWorkerManager.h"
 
 #include "CallEvent.h"
 #include "TelephonyCall.h"
 
 USING_TELEPHONY_NAMESPACE
+using namespace mozilla::dom::gonk;
 using mozilla::Preferences;
 
 #define DOM_TELEPHONY_APP_PHONE_URL_PREF "dom.telephony.app.phone.url"
 
 namespace {
 
 typedef nsAutoTArray<Telephony*, 2> TelephonyList;
 
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -124,26 +124,26 @@
 #include "mozilla/dom/indexedDB/IndexedDatabaseManager.h"
 #include "mozilla/dom/DOMRequest.h"
 
 using mozilla::dom::indexedDB::IndexedDatabaseManager;
 using mozilla::dom::DOMRequestService;
 
 #ifdef MOZ_B2G_RIL
 #include "SystemWorkerManager.h"
-using mozilla::dom::telephony::SystemWorkerManager;
+using mozilla::dom::gonk::SystemWorkerManager;
 #define SYSTEMWORKERMANAGER_CID \
   {0xd53b6524, 0x6ac3, 0x42b0, {0xae, 0xca, 0x62, 0xb3, 0xc4, 0xe5, 0x2b, 0x04}}
 #define SYSTEMWORKERMANAGER_CONTRACTID \
   "@mozilla.org/telephony/system-worker-manager;1"
 #endif
 
 #ifdef MOZ_WIDGET_GONK
 #include "AudioManager.h"
-using mozilla::dom::telephony::AudioManager;
+using mozilla::dom::gonk::AudioManager;
 #endif
 
 // Editor stuff
 #include "nsEditorCID.h"
 #include "nsEditor.h"
 #include "nsPlaintextEditor.h"
 #include "nsEditorController.h" //CID