Bug 814556 - 1/2: Move mozilla::dom::icc::* to mozilla::dom. r=khuey, f=Ms2ger
authorVicamo Yang <vyang@mozilla.com>
Tue, 22 Oct 2013 19:23:00 +0800
changeset 166352 db80d2993a269c37f8262fb32c9915570e50ff4f
parent 166351 dcab3b214724f662f0dd9b005a607ca6f60cbe0e
child 166353 666ca6ffb5efec23ad19c2ec7c9e556213b37b39
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs814556
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 814556 - 1/2: Move mozilla::dom::icc::* to mozilla::dom. r=khuey, f=Ms2ger
dom/base/Navigator.cpp
dom/base/Navigator.h
dom/bindings/Bindings.conf
dom/bindings/Makefile.in
dom/dom-config.mk
dom/icc/src/IccManager.cpp
dom/icc/src/IccManager.h
dom/icc/src/StkCommandEvent.cpp
dom/icc/src/StkCommandEvent.h
dom/icc/src/moz.build
dom/network/src/Makefile.in
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -32,17 +32,17 @@
 #include "mozilla/Hal.h"
 #include "nsISiteSpecificUserAgent.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/StaticPtr.h"
 #include "Connection.h"
 #include "nsDOMEvent.h"
 #include "nsGlobalWindow.h"
 #ifdef MOZ_B2G_RIL
-#include "IccManager.h"
+#include "mozilla/dom/IccManager.h"
 #include "MobileConnection.h"
 #include "mozilla/dom/CellBroadcast.h"
 #include "mozilla/dom/Voicemail.h"
 #endif
 #include "nsIIdleObserver.h"
 #include "nsIPermissionManager.h"
 #include "nsNetUtil.h"
 #include "nsIHttpChannel.h"
@@ -1224,17 +1224,17 @@ Navigator::GetMozIccManager(ErrorResult&
 {
   if (!mIccManager) {
     if (!mWindow) {
       aRv.Throw(NS_ERROR_UNEXPECTED);
       return nullptr;
     }
     NS_ENSURE_TRUE(mWindow->GetDocShell(), nullptr);
 
-    mIccManager = new icc::IccManager();
+    mIccManager = new IccManager();
     mIccManager->Init(mWindow);
   }
 
   return mIccManager;
 }
 
 #endif // MOZ_B2G_RIL
 
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -65,37 +65,32 @@ class MozIdleObserver;
 class Gamepad;
 #endif // MOZ_GAMEPAD
 #ifdef MOZ_MEDIA_NAVIGATOR
 class NavigatorUserMediaSuccessCallback;
 class NavigatorUserMediaErrorCallback;
 class MozGetUserMediaDevicesSuccessCallback;
 #endif // MOZ_MEDIA_NAVIGATOR
 
-namespace icc {
-#ifdef MOZ_B2G_RIL
-class IccManager;
-#endif
-}
-
 namespace network {
 class Connection;
 #ifdef MOZ_B2G_RIL
 class MobileConnection;
 #endif
 } // namespace Connection;
 
 #ifdef MOZ_B2G_BT
 namespace bluetooth {
 class BluetoothManager;
 } // namespace bluetooth
 #endif // MOZ_B2G_BT
 
 #ifdef MOZ_B2G_RIL
 class CellBroadcast;
+class IccManager;
 class Telephony;
 class Voicemail;
 #endif
 
 class PowerManager;
 
 namespace time {
 class TimeManager;
@@ -334,17 +329,17 @@ private:
 #ifdef MOZ_B2G_RIL
   nsRefPtr<Telephony> mTelephony;
   nsRefPtr<Voicemail> mVoicemail;
 #endif
   nsRefPtr<network::Connection> mConnection;
 #ifdef MOZ_B2G_RIL
   nsRefPtr<network::MobileConnection> mMobileConnection;
   nsRefPtr<CellBroadcast> mCellBroadcast;
-  nsRefPtr<icc::IccManager> mIccManager;
+  nsRefPtr<IccManager> mIccManager;
 #endif
 #ifdef MOZ_B2G_BT
   nsCOMPtr<bluetooth::BluetoothManager> mBluetooth;
 #endif
 #ifdef MOZ_AUDIO_CHANNEL_MANAGER
   nsRefPtr<system::AudioChannelManager> mAudioChannelManager;
 #endif
   nsRefPtr<nsDOMCameraManager> mCameraManager;
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -778,18 +778,17 @@ DOMInterfaces = {
     'nativeType': 'nsDOMAttributeMap',
 },
 
 'MozPowerManager': {
     'nativeType': 'mozilla::dom::PowerManager',
 },
 
 'MozStkCommandEvent' : {
-    'nativeType': 'mozilla::dom::icc::StkCommandEvent',
-    'headerFile': 'StkCommandEvent.h',
+    'nativeType': 'mozilla::dom::StkCommandEvent',
 },
 
 'MozTimeManager': {
     'nativeType': 'mozilla::dom::time::TimeManager',
 },
 
 'MozVoicemail': {
     'nativeType': 'mozilla::dom::Voicemail',
@@ -1867,9 +1866,9 @@ addExternalIface('CameraCapabilities', n
 addExternalIface('CameraAutoFocusCallback', nativeType='nsICameraAutoFocusCallback', headerFile='nsIDOMCameraManager.h')
 addExternalIface('CameraShutterCallback', nativeType='nsICameraShutterCallback', headerFile='nsIDOMCameraManager.h')
 addExternalIface('CameraClosedCallback', nativeType='nsICameraClosedCallback', headerFile='nsIDOMCameraManager.h')
 addExternalIface('CameraTakePictureCallback', nativeType='nsICameraTakePictureCallback', headerFile='nsIDOMCameraManager.h')
 addExternalIface('CameraReleaseCallback', nativeType='nsICameraReleaseCallback', headerFile='nsIDOMCameraManager.h')
 addExternalIface('CameraStartRecordingCallback', nativeType='nsICameraStartRecordingCallback', headerFile='nsIDOMCameraManager.h')
 addExternalIface('CameraPreviewStateChange', nativeType='nsICameraPreviewStateChange', headerFile='nsIDOMCameraManager.h')
 addExternalIface('CameraPreviewStreamCallback', nativeType='nsICameraPreviewStreamCallback', headerFile='nsIDOMCameraManager.h')
-addExternalIface('CameraRecorderStateChange', nativeType='nsICameraRecorderStateChange', headerFile='nsIDOMCameraManager.h')
\ No newline at end of file
+addExternalIface('CameraRecorderStateChange', nativeType='nsICameraRecorderStateChange', headerFile='nsIDOMCameraManager.h')
--- a/dom/bindings/Makefile.in
+++ b/dom/bindings/Makefile.in
@@ -90,22 +90,16 @@ LOCAL_INCLUDES += -I$(topsrcdir)/js/xpco
   $(NULL)
 
 ifdef MOZ_AUDIO_CHANNEL_MANAGER
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/dom/system/gonk \
   $(NULL)
 endif
 
-ifdef MOZ_B2G_RIL
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/dom/icc/src \
-  $(NULL)
-endif
-
 ABS_DIST := $(abspath $(DIST))
 
 EXTRA_EXPORT_MDDEPEND_FILES := $(addsuffix .pp,$(binding_dependency_trackers))
 
 EXPORTS_GENERATED_FILES := $(exported_binding_headers) $(exported_generated_events_headers)
 EXPORTS_GENERATED_DEST := $(ABS_DIST)/include/$(binding_include_path)
 EXPORTS_GENERATED_TARGET := export
 INSTALL_TARGETS += EXPORTS_GENERATED
--- a/dom/dom-config.mk
+++ b/dom/dom-config.mk
@@ -36,17 +36,16 @@ DOM_SRCDIRS = \
   layout/xul/tree \
   dom/camera \
   $(NULL)
 
 ifdef MOZ_B2G_RIL
 DOM_SRCDIRS += \
   dom/system/gonk \
   dom/wifi \
-  dom/icc/src \
   $(NULL)
 endif
 
 ifdef MOZ_B2G_FM
 DOM_SRCDIRS += \
   dom/fmradio \
   $(NULL)
 endif
--- a/dom/icc/src/IccManager.cpp
+++ b/dom/icc/src/IccManager.cpp
@@ -1,23 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
+#include "mozilla/dom/IccManager.h"
+
+#include "GeneratedEvents.h"
+#include "mozilla/dom/StkCommandEvent.h"
 #include "mozilla/Services.h"
 #include "nsIDOMClassInfo.h"
 #include "nsIDOMIccInfo.h"
-#include "GeneratedEvents.h"
-#include "IccManager.h"
 #include "SimToolKit.h"
-#include "StkCommandEvent.h"
 
 #define NS_RILCONTENTHELPER_CONTRACTID "@mozilla.org/ril/content-helper;1"
 
-using namespace mozilla::dom::icc;
+using namespace mozilla::dom;
 
 class IccManager::Listener : public nsIIccListener
 {
   IccManager* mIccManager;
 
 public:
   NS_DECL_ISUPPORTS
   NS_FORWARD_SAFE_NSIICCLISTENER(mIccManager)
@@ -33,17 +34,17 @@ public:
   {
     MOZ_ASSERT(mIccManager);
     mIccManager = nullptr;
   }
 };
 
 NS_IMPL_ISUPPORTS1(IccManager::Listener, nsIIccListener)
 
-DOMCI_DATA(MozIccManager, mozilla::dom::icc::IccManager)
+DOMCI_DATA(MozIccManager, IccManager)
 
 NS_INTERFACE_MAP_BEGIN(IccManager)
   NS_INTERFACE_MAP_ENTRY(nsIDOMMozIccManager)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MozIccManager)
 NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(IccManager, nsDOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(IccManager, nsDOMEventTargetHelper)
@@ -272,9 +273,9 @@ IccManager::NotifyCardStateChanged()
 {
   return DispatchTrustedEvent(NS_LITERAL_STRING("cardstatechange"));
 }
 
 NS_IMETHODIMP
 IccManager::NotifyIccInfoChanged()
 {
   return DispatchTrustedEvent(NS_LITERAL_STRING("iccinfochange"));
-}
\ No newline at end of file
+}
--- a/dom/icc/src/IccManager.h
+++ b/dom/icc/src/IccManager.h
@@ -1,23 +1,22 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
-#ifndef mozilla_dom_icc_IccManager_h
-#define mozilla_dom_icc_IccManager_h
+#ifndef mozilla_dom_IccManager_h
+#define mozilla_dom_IccManager_h
 
 #include "nsCycleCollectionParticipant.h"
 #include "nsDOMEventTargetHelper.h"
 #include "nsIDOMIccManager.h"
 #include "nsIIccProvider.h"
 
 namespace mozilla {
 namespace dom {
-namespace icc {
 
 class IccManager : public nsDOMEventTargetHelper
                  , public nsIDOMMozIccManager
 {
   /**
    * Class IccManager doesn't actually inherit nsIIccListener. Instead, it owns
    * an nsIIccListener derived instance mListener and passes it to
    * nsIIccProvider. The onreceived events are first delivered to mListener and
@@ -37,13 +36,12 @@ public:
   void Init(nsPIDOMWindow *aWindow);
   void Shutdown();
 
 private:
   nsCOMPtr<nsIIccProvider> mProvider;
   nsRefPtr<Listener> mListener;
 };
 
-} // namespace icc
 } // namespace dom
 } // namespace mozilla
 
-#endif // mozilla_dom_icc_IccManager_h
+#endif // mozilla_dom_IccManager_h
--- a/dom/icc/src/StkCommandEvent.cpp
+++ b/dom/icc/src/StkCommandEvent.cpp
@@ -1,25 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
-#include "SimToolKit.h"
-#include "StkCommandEvent.h"
+#include "mozilla/dom/StkCommandEvent.h"
 
-#include "nsJSON.h"
 #include "jsapi.h"
 #include "jsfriendapi.h"
+#include "nsJSON.h"
+#include "SimToolKit.h"
 
 namespace mozilla {
 namespace dom {
-namespace icc {
 
 already_AddRefed<StkCommandEvent>
-StkCommandEvent::Create(mozilla::dom::EventTarget* aOwner,
+StkCommandEvent::Create(EventTarget* aOwner,
                         const nsAString& aMessage)
 {
   nsRefPtr<StkCommandEvent> event = new StkCommandEvent(aOwner);
   event->mCommand = aMessage;
   return event.forget();
 }
 
 NS_IMPL_ADDREF_INHERITED(StkCommandEvent, nsDOMEvent)
@@ -40,11 +39,10 @@ StkCommandEvent::GetCommand(JSContext* a
     NS_ENSURE_SUCCESS(rv, rv);
   } else {
     *aCommand = JSVAL_VOID;
   }
 
   return NS_OK;
 }
 
-}
-}
-}
+} // namespace dom
+} // namespace mozilla
--- a/dom/icc/src/StkCommandEvent.h
+++ b/dom/icc/src/StkCommandEvent.h
@@ -1,22 +1,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
-#ifndef mozilla_dom_icc_stkcommandevent_h
-#define mozilla_dom_icc_stkcommandevent_h
+#ifndef mozilla_dom_StkCommandEvent_h
+#define mozilla_dom_StkCommandEvent_h
 
+#include "mozilla/dom/MozStkCommandEventBinding.h"
 #include "nsDOMEvent.h"
 #include "SimToolKit.h"
-#include "mozilla/dom/MozStkCommandEventBinding.h"
 
 namespace mozilla {
 namespace dom {
-namespace icc {
 
 class StkCommandEvent : public nsDOMEvent,
                         public nsIDOMMozStkCommandEvent
 {
   nsString mCommand;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
@@ -44,34 +43,33 @@ public:
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aScope) MOZ_OVERRIDE
   {
-    return mozilla::dom::MozStkCommandEventBinding::Wrap(aCx, aScope, this);
+    return MozStkCommandEventBinding::Wrap(aCx, aScope, this);
   }
 
-  JS::Value GetCommand(JSContext* aCx, mozilla::ErrorResult& aRv)
+  JS::Value GetCommand(JSContext* aCx, ErrorResult& aRv)
   {
     JS::Rooted<JS::Value> retVal(aCx);
     aRv = GetCommand(aCx, retVal.address());
     return retVal;
   }
 
 private:
-  StkCommandEvent(mozilla::dom::EventTarget* aOwner)
+  StkCommandEvent(EventTarget* aOwner)
   : nsDOMEvent(aOwner, nullptr, nullptr)
   {
     SetIsDOMBinding();
   }
 
   ~StkCommandEvent()
   { }
 };
 
-}
-}
-}
+} // namespace dom
+} // namespace mozilla
 
-#endif // mozilla_dom_icc_stkcommandevent_h
+#endif // mozilla_dom_StkCommandEvent_h
--- a/dom/icc/src/moz.build
+++ b/dom/icc/src/moz.build
@@ -1,15 +1,16 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-EXPORTS.mozilla.dom.icc += [
+EXPORTS.mozilla.dom += [
+    'IccManager.h',
     'StkCommandEvent.h',
 ]
 
 CPP_SOURCES += [
     'IccManager.cpp',
     'StkCommandEvent.cpp',
 ]
 
--- a/dom/network/src/Makefile.in
+++ b/dom/network/src/Makefile.in
@@ -1,23 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
 VPATH            = $(srcdir)
 
-ifdef MOZ_B2G_RIL
-endif
-
 include $(topsrcdir)/dom/dom-config.mk
 
 LOCAL_INCLUDES = \
   -I$(topsrcdir)/content/events/src \
   $(NULL)
 
-ifdef MOZ_B2G_RIL
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/dom/icc/src \
-  $(NULL)
-endif
-
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk