Bug 939672 - Patch 2/2: Move NS_DECL_ISUPPORTS and NS_DECL_NSIOBSERVER into BluetoothProfileManagerBase.h
authorBen Tian <btian@mozilla.com>
Thu, 20 Feb 2014 18:15:47 +0800
changeset 170380 f1ab0605c3e0408f867799d546faac59af77f4ff
parent 170379 498aa10dff2f7e2914dbb3c67fc6981c77361104
child 170381 43e4d327026e13dbf842a0e54c6bd78d7fa9a753
push id40218
push usercbook@mozilla.com
push dateTue, 25 Feb 2014 14:18:19 +0000
treeherdermozilla-inbound@465f58380970 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs939672
milestone30.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 939672 - Patch 2/2: Move NS_DECL_ISUPPORTS and NS_DECL_NSIOBSERVER into BluetoothProfileManagerBase.h
dom/bluetooth/BluetoothHidManager.h
dom/bluetooth/BluetoothProfileManagerBase.h
dom/bluetooth/BluetoothService.cpp
dom/bluetooth/bluedroid/BluetoothA2dpManager.h
dom/bluetooth/bluedroid/BluetoothOppManager.h
dom/bluetooth/bluedroid/hfp-fallback/BluetoothHfpManager.h
dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h
dom/bluetooth/bluez/BluetoothA2dpManager.h
dom/bluetooth/bluez/BluetoothHfpManager.h
dom/bluetooth/bluez/BluetoothOppManager.h
--- a/dom/bluetooth/BluetoothHidManager.h
+++ b/dom/bluetooth/BluetoothHidManager.h
@@ -11,18 +11,16 @@
 #include "BluetoothProfileController.h"
 #include "BluetoothProfileManagerBase.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothHidManager : public BluetoothProfileManagerBase
 {
 public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIOBSERVER
   BT_DECL_PROFILE_MGR_BASE
   virtual void GetName(nsACString& aName)
   {
     aName.AssignLiteral("HID");
   }
 
   static BluetoothHidManager* Get();
   virtual ~BluetoothHidManager();
--- a/dom/bluetooth/BluetoothProfileManagerBase.h
+++ b/dom/bluetooth/BluetoothProfileManagerBase.h
@@ -67,16 +67,18 @@ public:
   /**
    * Returns string of profile name
    */
   virtual void GetName(nsACString& aName) = 0;
 };
 
 #define BT_DECL_PROFILE_MGR_BASE                                                 \
 public:                                                                          \
+  NS_DECL_ISUPPORTS                                                              \
+  NS_DECL_NSIOBSERVER                                                            \
   virtual void OnGetServiceChannel(const nsAString& aDeviceAddress,              \
                                    const nsAString& aServiceUuid,                \
                                    int aChannel) MOZ_OVERRIDE;                   \
   virtual void OnUpdateSdpRecords(const nsAString& aDeviceAddress) MOZ_OVERRIDE; \
   virtual void GetAddress(nsAString& aDeviceAddress) MOZ_OVERRIDE;               \
   virtual bool IsConnected() MOZ_OVERRIDE;                                       \
   virtual void Connect(const nsAString& aDeviceAddress,                          \
                        BluetoothProfileController* aController) MOZ_OVERRIDE;    \
--- a/dom/bluetooth/BluetoothService.cpp
+++ b/dom/bluetooth/BluetoothService.cpp
@@ -542,17 +542,17 @@ BluetoothService::SetEnabled(bool aEnabl
       RemoveObserversExceptBluetoothManager, nullptr);
   }
 
   /**
    * mEnabled: real status of bluetooth
    * aEnabled: expected status of bluetooth
    */
   if (mEnabled == aEnabled) {
-    BT_WARNING("Bluetooth has already been enabled/disabled before"
+    BT_WARNING("Bluetooth has already been enabled/disabled before "
                "or the toggling is failed.");
   }
 
   mEnabled = aEnabled;
 }
 
 nsresult
 BluetoothService::HandleStartup()
--- a/dom/bluetooth/bluedroid/BluetoothA2dpManager.h
+++ b/dom/bluetooth/bluedroid/BluetoothA2dpManager.h
@@ -10,18 +10,16 @@
 #include "BluetoothCommon.h"
 #include "BluetoothProfileController.h"
 #include "BluetoothProfileManagerBase.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 class BluetoothA2dpManager : public BluetoothProfileManagerBase
 {
 public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIOBSERVER
   BT_DECL_PROFILE_MGR_BASE
   virtual void GetName(nsACString& aName)
   {
     aName.AssignLiteral("A2DP");
   }
 
   enum SinkState {
     SINK_UNKNOWN,
--- a/dom/bluetooth/bluedroid/BluetoothOppManager.h
+++ b/dom/bluetooth/bluedroid/BluetoothOppManager.h
@@ -24,18 +24,16 @@ BEGIN_BLUETOOTH_NAMESPACE
 class BluetoothSocket;
 class ObexHeaderSet;
 class SendFileBatch;
 
 class BluetoothOppManager : public BluetoothSocketObserver
                           , public BluetoothProfileManagerBase
 {
 public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIOBSERVER
   BT_DECL_PROFILE_MGR_BASE
   virtual void GetName(nsACString& aName)
   {
     aName.AssignLiteral("OPP");
   }
 
   static const int MAX_PACKET_LENGTH = 0xFFFE;
 
--- a/dom/bluetooth/bluedroid/hfp-fallback/BluetoothHfpManager.h
+++ b/dom/bluetooth/bluedroid/hfp-fallback/BluetoothHfpManager.h
@@ -17,18 +17,16 @@
  * BluetoothHfpManager away from numerous #ifdef/#endif statements.
  */
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothHfpManager : public BluetoothHfpManagerBase
 {
 public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIOBSERVER
   BT_DECL_HFP_MGR_BASE
   virtual void GetName(nsACString& aName)
   {
     aName.AssignLiteral("Fallback HFP/HSP");
   }
 
   static BluetoothHfpManager* Get();
   virtual ~BluetoothHfpManager() { }
--- a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h
+++ b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h
@@ -70,18 +70,16 @@ public:
   bthf_call_direction_t mDirection; // 0: outgoing call; 1: incoming call
   bthf_call_addrtype_t mType;
 };
 
 class BluetoothHfpManager : public BluetoothHfpManagerBase
                           , public BatteryObserver
 {
 public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIOBSERVER
   BT_DECL_HFP_MGR_BASE
   virtual void GetName(nsACString& aName)
   {
     aName.AssignLiteral("HFP/HSP");
   }
 
   static BluetoothHfpManager* Get();
   virtual ~BluetoothHfpManager();
--- a/dom/bluetooth/bluez/BluetoothA2dpManager.h
+++ b/dom/bluetooth/bluez/BluetoothA2dpManager.h
@@ -11,18 +11,16 @@
 #include "BluetoothProfileController.h"
 #include "BluetoothProfileManagerBase.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothA2dpManager : public BluetoothProfileManagerBase
 {
 public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIOBSERVER
   BT_DECL_PROFILE_MGR_BASE
   virtual void GetName(nsACString& aName)
   {
     aName.AssignLiteral("A2DP");
   }
 
   enum SinkState {
     SINK_UNKNOWN,
--- a/dom/bluetooth/bluez/BluetoothHfpManager.h
+++ b/dom/bluetooth/bluez/BluetoothHfpManager.h
@@ -74,18 +74,16 @@ public:
 };
 #endif // MOZ_B2G_RIL
 
 class BluetoothHfpManager : public BluetoothSocketObserver
                           , public BluetoothHfpManagerBase
                           , public BatteryObserver
 {
 public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIOBSERVER
   BT_DECL_HFP_MGR_BASE
   virtual void GetName(nsACString& aName)
   {
     aName.AssignLiteral("HFP/HSP");
   }
 
   static BluetoothHfpManager* Get();
   ~BluetoothHfpManager();
--- a/dom/bluetooth/bluez/BluetoothOppManager.h
+++ b/dom/bluetooth/bluez/BluetoothOppManager.h
@@ -24,18 +24,16 @@ BEGIN_BLUETOOTH_NAMESPACE
 class BluetoothSocket;
 class ObexHeaderSet;
 class SendFileBatch;
 
 class BluetoothOppManager : public BluetoothSocketObserver
                           , public BluetoothProfileManagerBase
 {
 public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIOBSERVER
   BT_DECL_PROFILE_MGR_BASE
   virtual void GetName(nsACString& aName)
   {
     aName.AssignLiteral("OPP");
   }
 
   static const int MAX_PACKET_LENGTH = 0xFFFE;