diff --git a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp index 48db47da3b18..7191841cd7ad 100644 --- a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp @@ -129,7 +129,7 @@ private: }; class BluetoothA2dpManager::InitProfileResultHandlerRunnable final - : public nsRunnable + : public Runnable { public: InitProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes, @@ -171,7 +171,7 @@ BluetoothA2dpManager::InitA2dpInterface(BluetoothProfileResultHandler* aRes) if (sBtA2dpInterface) { BT_LOGR("Bluetooth A2DP interface is already initalized."); - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_OK); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch A2DP Init runnable"); @@ -184,7 +184,7 @@ BluetoothA2dpManager::InitA2dpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!btInf)) { // If there's no Bluetooth interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch A2DP OnError runnable"); @@ -197,7 +197,7 @@ BluetoothA2dpManager::InitA2dpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!setupInterface)) { // If there's no Setup interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch A2DP OnError runnable"); @@ -210,7 +210,7 @@ BluetoothA2dpManager::InitA2dpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!a2dpInterface)) { // If there's no A2DP interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch A2DP OnError runnable"); @@ -329,7 +329,7 @@ private: }; class BluetoothA2dpManager::DeinitProfileResultHandlerRunnable final - : public nsRunnable + : public Runnable { public: DeinitProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes, @@ -365,7 +365,7 @@ BluetoothA2dpManager::DeinitA2dpInterface(BluetoothProfileResultHandler* aRes) if (!sBtA2dpInterface) { BT_LOGR("Bluetooth A2DP interface has not been initalized."); - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_OK); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch A2DP Deinit runnable"); @@ -378,7 +378,7 @@ BluetoothA2dpManager::DeinitA2dpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!btInf)) { // If there's no backend interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch A2DP OnError runnable"); @@ -391,7 +391,7 @@ BluetoothA2dpManager::DeinitA2dpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!setupInterface)) { // If there's no Setup interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch A2DP OnError runnable"); diff --git a/dom/bluetooth/bluedroid/BluetoothAvrcpManager.cpp b/dom/bluetooth/bluedroid/BluetoothAvrcpManager.cpp index 2c3e03bceb6d..cca192d74365 100644 --- a/dom/bluetooth/bluedroid/BluetoothAvrcpManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothAvrcpManager.cpp @@ -172,7 +172,7 @@ private: }; class BluetoothAvrcpManager::InitProfileResultHandlerRunnable final - : public nsRunnable + : public Runnable { public: InitProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes, @@ -211,7 +211,7 @@ BluetoothAvrcpManager::InitAvrcpInterface(BluetoothProfileResultHandler* aRes) if (sBtAvrcpInterface) { BT_LOGR("Bluetooth AVRCP interface is already initalized."); - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_OK); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch AVRCP Init runnable"); @@ -224,7 +224,7 @@ BluetoothAvrcpManager::InitAvrcpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!btInf)) { // If there's no Bluetooth interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch AVRCP OnError runnable"); @@ -237,7 +237,7 @@ BluetoothAvrcpManager::InitAvrcpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!setupInterface)) { // If there's no Setup interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch AVRCP OnError runnable"); @@ -250,7 +250,7 @@ BluetoothAvrcpManager::InitAvrcpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!avrcpInterface)) { // If there's no AVRCP interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch AVRCP OnError runnable"); @@ -350,7 +350,7 @@ private: }; class BluetoothAvrcpManager::DeinitProfileResultHandlerRunnable final - : public nsRunnable + : public Runnable { public: DeinitProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes, @@ -386,7 +386,7 @@ BluetoothAvrcpManager::DeinitAvrcpInterface(BluetoothProfileResultHandler* aRes) if (!sBtAvrcpInterface) { BT_LOGR("Bluetooth AVRCP interface has not been initalized."); - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_OK); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch AVRCP Deinit runnable"); @@ -399,7 +399,7 @@ BluetoothAvrcpManager::DeinitAvrcpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!btInf)) { // If there's no backend interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch AVRCP OnError runnable"); @@ -412,7 +412,7 @@ BluetoothAvrcpManager::DeinitAvrcpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!setupInterface)) { // If there's no Setup interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch AVRCP OnError runnable"); @@ -434,7 +434,7 @@ BluetoothAvrcpManager::HandleShutdown() sBluetoothAvrcpManager = nullptr; } -class BluetoothAvrcpManager::ConnectRunnable final : public nsRunnable +class BluetoothAvrcpManager::ConnectRunnable final : public Runnable { public: ConnectRunnable(BluetoothAvrcpManager* aManager) @@ -467,7 +467,7 @@ BluetoothAvrcpManager::Connect(const BluetoothAddress& aDeviceAddress, NS_DispatchToMainThread(new ConnectRunnable(this)); } -class BluetoothAvrcpManager::DisconnectRunnable final : public nsRunnable +class BluetoothAvrcpManager::DisconnectRunnable final : public Runnable { public: DisconnectRunnable(BluetoothAvrcpManager* aManager) diff --git a/dom/bluetooth/bluedroid/BluetoothGattManager.cpp b/dom/bluetooth/bluedroid/BluetoothGattManager.cpp index 5c8eb6b2a6eb..969b5ed710c3 100644 --- a/dom/bluetooth/bluedroid/BluetoothGattManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothGattManager.cpp @@ -465,7 +465,7 @@ private: }; class BluetoothGattManager::InitProfileResultHandlerRunnable final - : public nsRunnable + : public Runnable { public: InitProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes, @@ -501,7 +501,7 @@ BluetoothGattManager::InitGattInterface(BluetoothProfileResultHandler* aRes) if (sBluetoothGattInterface) { BT_LOGR("Bluetooth GATT interface is already initalized."); - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_OK); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch GATT Init runnable"); @@ -514,7 +514,7 @@ BluetoothGattManager::InitGattInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!btInf)) { // If there's no Bluetooth interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch GATT OnError runnable"); @@ -527,7 +527,7 @@ BluetoothGattManager::InitGattInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!setupInterface)) { // If there's no Setup interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch GATT OnError runnable"); @@ -540,7 +540,7 @@ BluetoothGattManager::InitGattInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!gattInterface)) { // If there's no GATT interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch GATT OnError runnable"); @@ -615,7 +615,7 @@ private: }; class BluetoothGattManager::DeinitProfileResultHandlerRunnable final - : public nsRunnable + : public Runnable { public: DeinitProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes, @@ -651,7 +651,7 @@ BluetoothGattManager::DeinitGattInterface(BluetoothProfileResultHandler* aRes) if (!sBluetoothGattInterface) { BT_LOGR("Bluetooth GATT interface has not been initalized."); - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_OK); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch GATT Deinit runnable"); @@ -664,7 +664,7 @@ BluetoothGattManager::DeinitGattInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!btInf)) { // If there's no backend interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch GATT OnError runnable"); @@ -677,7 +677,7 @@ BluetoothGattManager::DeinitGattInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!setupInterface)) { // If there's no Setup interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch GATT OnError runnable"); diff --git a/dom/bluetooth/bluedroid/BluetoothHidManager.cpp b/dom/bluetooth/bluedroid/BluetoothHidManager.cpp index 7086c5f9c61b..6f90d0831e35 100644 --- a/dom/bluetooth/bluedroid/BluetoothHidManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothHidManager.cpp @@ -94,7 +94,7 @@ private: }; class BluetoothHidManager::InitProfileResultHandlerRunnable final - : public nsRunnable + : public Runnable { public: InitProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes, @@ -130,7 +130,7 @@ BluetoothHidManager::InitHidInterface(BluetoothProfileResultHandler* aRes) if (sBluetoothHidInterface) { BT_LOGR("Bluetooth HID interface is already initialized."); - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_OK); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HID Init runnable"); @@ -143,7 +143,7 @@ BluetoothHidManager::InitHidInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!btInf)) { // If there's no backend interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HID OnError runnable"); @@ -156,7 +156,7 @@ BluetoothHidManager::InitHidInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!setupInterface)) { // If there's no Setup interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HID OnError runnable"); @@ -169,7 +169,7 @@ BluetoothHidManager::InitHidInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!hidinterface)) { // If there's no HID interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HID OnError runnable"); @@ -246,7 +246,7 @@ private: }; class BluetoothHidManager::DeinitProfileResultHandlerRunnable final - : public nsRunnable + : public Runnable { public: DeinitProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes, @@ -282,7 +282,7 @@ BluetoothHidManager::DeinitHidInterface(BluetoothProfileResultHandler* aRes) if (!sBluetoothHidInterface) { BT_LOGR("Bluetooth Hid interface has not been initialized."); - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_OK); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HID Deinit runnable"); @@ -295,7 +295,7 @@ BluetoothHidManager::DeinitHidInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!btInf)) { // If there's no backend interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HID OnError runnable"); @@ -308,7 +308,7 @@ BluetoothHidManager::DeinitHidInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!setupInterface)) { // If there's no Setup interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HID OnError runnable"); diff --git a/dom/bluetooth/bluedroid/BluetoothOppManager.cpp b/dom/bluetooth/bluedroid/BluetoothOppManager.cpp index c2aab45d2230..d2f08e8700c4 100644 --- a/dom/bluetooth/bluedroid/BluetoothOppManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothOppManager.cpp @@ -102,7 +102,7 @@ BluetoothOppManager::Observe(nsISupports* aSubject, return NS_ERROR_UNEXPECTED; } -class BluetoothOppManager::SendSocketDataTask final : public nsRunnable +class BluetoothOppManager::SendSocketDataTask final : public Runnable { public: SendSocketDataTask(UniquePtr aStream, uint32_t aSize) @@ -126,7 +126,7 @@ private: uint32_t mSize; }; -class BluetoothOppManager::ReadFileTask final : public nsRunnable +class BluetoothOppManager::ReadFileTask final : public Runnable { public: ReadFileTask(nsIInputStream* aInputStream, diff --git a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp index 427a5e77243d..63238d3051e8 100644 --- a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp +++ b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp @@ -118,7 +118,7 @@ private: } }; -class BluetoothHfpManager::CloseScoRunnable : public nsRunnable +class BluetoothHfpManager::CloseScoRunnable : public Runnable { public: NS_IMETHOD Run() override @@ -319,7 +319,7 @@ private: }; class BluetoothHfpManager::InitProfileResultHandlerRunnable final - : public nsRunnable + : public Runnable { public: InitProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes, @@ -355,7 +355,7 @@ BluetoothHfpManager::InitHfpInterface(BluetoothProfileResultHandler* aRes) if (sBluetoothHfpInterface) { BT_LOGR("Bluetooth Handsfree interface is already initalized."); - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_OK); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HFP Init runnable"); @@ -368,7 +368,7 @@ BluetoothHfpManager::InitHfpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!btInf)) { // If there's no backend interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HFP OnError runnable"); @@ -381,7 +381,7 @@ BluetoothHfpManager::InitHfpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!setupInterface)) { // If there's no Setup interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HFP OnError runnable"); @@ -394,7 +394,7 @@ BluetoothHfpManager::InitHfpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!interface)) { // If there's no HFP interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new InitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HFP OnError runnable"); @@ -471,7 +471,7 @@ private: }; class BluetoothHfpManager::DeinitProfileResultHandlerRunnable final - : public nsRunnable + : public Runnable { public: DeinitProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes, @@ -507,7 +507,7 @@ BluetoothHfpManager::DeinitHfpInterface(BluetoothProfileResultHandler* aRes) if (!sBluetoothHfpInterface) { BT_LOGR("Bluetooth Handsfree interface has not been initialized."); - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_OK); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HFP Deinit runnable"); @@ -520,7 +520,7 @@ BluetoothHfpManager::DeinitHfpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!btInf)) { // If there's no backend interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HFP OnError runnable"); @@ -533,7 +533,7 @@ BluetoothHfpManager::DeinitHfpInterface(BluetoothProfileResultHandler* aRes) if (NS_WARN_IF(!setupInterface)) { // If there's no Setup interface, we dispatch a runnable // that calls the profile result handler. - RefPtr r = + RefPtr r = new DeinitProfileResultHandlerRunnable(aRes, NS_ERROR_FAILURE); if (NS_FAILED(NS_DispatchToMainThread(r))) { BT_LOGR("Failed to dispatch HFP OnError runnable"); diff --git a/dom/bluetooth/bluez/BluetoothDBusService.cpp b/dom/bluetooth/bluez/BluetoothDBusService.cpp index d0df1ecf2361..c642045a4954 100644 --- a/dom/bluetooth/bluez/BluetoothDBusService.cpp +++ b/dom/bluetooth/bluez/BluetoothDBusService.cpp @@ -513,7 +513,7 @@ GetPairedDevicesFilter(const BluetoothValue& aValue) return false; } -class DistributeBluetoothSignalTask : public nsRunnable +class DistributeBluetoothSignalTask : public Runnable { public: DistributeBluetoothSignalTask(const BluetoothSignal& aSignal) @@ -536,7 +536,7 @@ private: BluetoothSignal mSignal; }; -class ControlPropertyChangedHandler : public nsRunnable +class ControlPropertyChangedHandler : public Runnable { public: ControlPropertyChangedHandler(const BluetoothSignal& aSignal) @@ -568,7 +568,7 @@ private: BluetoothSignal mSignal; }; -class SinkPropertyChangedHandler : public nsRunnable +class SinkPropertyChangedHandler : public Runnable { public: SinkPropertyChangedHandler(const BluetoothSignal& aSignal) @@ -598,7 +598,7 @@ private: BluetoothSignal mSignal; }; -class InputPropertyChangedHandler : public nsRunnable +class InputPropertyChangedHandler : public Runnable { public: InputPropertyChangedHandler(const BluetoothSignal& aSignal) @@ -637,7 +637,7 @@ public: } }; -class TryFiringAdapterAddedRunnable : public nsRunnable +class TryFiringAdapterAddedRunnable : public Runnable { public: TryFiringAdapterAddedRunnable(bool aDelay) @@ -719,7 +719,7 @@ UnpackObjectPathMessage(DBusMessage* aMsg, DBusError* aErr, } } -class PrepareProfileManagersRunnable : public nsRunnable +class PrepareProfileManagersRunnable : public Runnable { public: nsresult Run() @@ -808,7 +808,7 @@ GetVoidCallback(DBusMessage* aMsg, void* aBluetoothReplyRunnable) UnpackVoidMessage); } -class ReplyErrorToProfileManager : public nsRunnable +class ReplyErrorToProfileManager : public Runnable { public: ReplyErrorToProfileManager(BluetoothServiceClass aServiceClass, @@ -1726,7 +1726,7 @@ public: } }; -class PrepareAdapterRunnable : public nsRunnable +class PrepareAdapterRunnable : public Runnable { public: PrepareAdapterRunnable() @@ -1743,7 +1743,7 @@ public: } }; -class RequestPlayStatusTask : public nsRunnable +class RequestPlayStatusTask : public Runnable { public: RequestPlayStatusTask() @@ -2016,7 +2016,7 @@ EventFilter(DBusConnection* aConn, DBusMessage* aMsg, void* aData) } BluetoothSignal signal(signalName, signalPath, v); - RefPtr task; + RefPtr task; if (signalInterface.EqualsLiteral(DBUS_SINK_IFACE)) { task = new SinkPropertyChangedHandler(signal); } else if (signalInterface.EqualsLiteral(DBUS_CTL_IFACE)) { @@ -2086,7 +2086,7 @@ public: if (sDBusConnection) { BT_WARNING("DBus connection has already been established."); - RefPtr runnable = new BluetoothService::ToggleBtAck(true); + RefPtr runnable = new BluetoothService::ToggleBtAck(true); if (NS_FAILED(NS_DispatchToMainThread(runnable))) { BT_WARNING("Failed to dispatch to main thread!"); } @@ -2097,7 +2097,7 @@ public: if (!dbus_connection_add_filter(mConnection->GetConnection(), EventFilter, nullptr, nullptr)) { BT_WARNING("Cannot create DBus Event Filter for DBus Thread!"); - RefPtr runnable = new BluetoothService::ToggleBtAck(false); + RefPtr runnable = new BluetoothService::ToggleBtAck(false); if (NS_FAILED(NS_DispatchToMainThread(runnable))) { BT_WARNING("Failed to dispatch to main thread!"); } @@ -2112,7 +2112,7 @@ public: sDBusConnection = mConnection.release(); - RefPtr runnable = + RefPtr runnable = new BluetoothService::ToggleBtAck(true); if (NS_FAILED(NS_DispatchToMainThread(runnable))) { BT_WARNING("Failed to dispatch to main thread!"); @@ -2142,7 +2142,7 @@ private: UniquePtr mConnection; }; -class StartBluetoothRunnable final : public nsRunnable +class StartBluetoothRunnable final : public Runnable { public: NS_IMETHOD Run() @@ -2153,7 +2153,7 @@ public: #ifdef MOZ_WIDGET_GONK if (!sBluedroid.Enable()) { BT_WARNING("Bluetooth not available."); - RefPtr runnable = new BluetoothService::ToggleBtAck(false); + RefPtr runnable = new BluetoothService::ToggleBtAck(false); if (NS_FAILED(NS_DispatchToMainThread(runnable))) { BT_WARNING("Failed to dispatch to main thread!"); } @@ -2165,7 +2165,7 @@ public: nsresult rv = connection->EstablishDBusConnection(); if (NS_FAILED(rv)) { BT_WARNING("Failed to establish connection to BlueZ daemon"); - RefPtr runnable = new BluetoothService::ToggleBtAck(false); + RefPtr runnable = new BluetoothService::ToggleBtAck(false); if (NS_FAILED(NS_DispatchToMainThread(runnable))) { BT_WARNING("Failed to dispatch to main thread!"); } @@ -2202,7 +2202,7 @@ BluetoothDBusService::StartInternal(BluetoothReplyRunnable* aRunnable) { MOZ_ASSERT(!aRunnable); - RefPtr runnable = new StartBluetoothRunnable(); + RefPtr runnable = new StartBluetoothRunnable(); nsresult rv = DispatchToBtThread(runnable); if (NS_FAILED(rv)) { BT_WARNING("Failed to dispatch to BT thread!"); @@ -2210,7 +2210,7 @@ BluetoothDBusService::StartInternal(BluetoothReplyRunnable* aRunnable) return rv; } -class DisableBluetoothRunnable final : public nsRunnable +class DisableBluetoothRunnable final : public Runnable { public: NS_IMETHOD Run() @@ -2230,7 +2230,7 @@ public: bool isEnabled = false; #endif - RefPtr runnable = + RefPtr runnable = new BluetoothService::ToggleBtAck(isEnabled); nsresult rv = NS_DispatchToMainThread(runnable); if (NS_FAILED(rv)) { @@ -2252,7 +2252,7 @@ public: if (!sDBusConnection) { BT_WARNING("DBus connection has not been established."); - RefPtr runnable = new BluetoothService::ToggleBtAck(false); + RefPtr runnable = new BluetoothService::ToggleBtAck(false); if (NS_FAILED(NS_DispatchToMainThread(runnable))) { BT_WARNING("Failed to dispatch to main thread!"); } @@ -2295,14 +2295,14 @@ public: // We can only dispatch to the BT thread if we're on the main // thread. Thus we dispatch our runnable to the main thread // from where it will forward itself to the BT thread. - RefPtr runnable = new DisableBluetoothRunnable(); + RefPtr runnable = new DisableBluetoothRunnable(); if (NS_FAILED(NS_DispatchToMainThread(runnable))) { BT_WARNING("Failed to dispatch to BT thread!"); } } }; -class StopBluetoothRunnable final : public nsRunnable +class StopBluetoothRunnable final : public Runnable { public: NS_IMETHOD Run() @@ -2326,7 +2326,7 @@ BluetoothDBusService::StopInternal(BluetoothReplyRunnable* aRunnable) { MOZ_ASSERT(!aRunnable); - RefPtr runnable = new StopBluetoothRunnable(); + RefPtr runnable = new StopBluetoothRunnable(); nsresult rv = DispatchToBtThread(runnable); if (NS_FAILED(rv)) { BT_WARNING("Failed to dispatch to BT thread!"); @@ -3514,7 +3514,7 @@ BluetoothDBusService::ToggleCalls(BluetoothReplyRunnable* aRunnable) } #endif // MOZ_B2G_RIL -class OnUpdateSdpRecordsRunnable : public nsRunnable +class OnUpdateSdpRecordsRunnable : public Runnable { public: OnUpdateSdpRecordsRunnable(const BluetoothAddress& aDeviceAddress, @@ -3541,7 +3541,7 @@ private: BluetoothProfileManagerBase* mManager; }; -class OnGetServiceChannelRunnable : public nsRunnable +class OnGetServiceChannelRunnable : public Runnable { public: OnGetServiceChannelRunnable(const BluetoothAddress& aDeviceAddress, @@ -3603,7 +3603,7 @@ public: channel = dbus_returns_int32(aReply); } - RefPtr r = + RefPtr r = new OnGetServiceChannelRunnable(mDeviceAddress, mServiceUUID, channel, mBluetoothProfileManager); nsresult rv = NS_DispatchToMainThread(r); @@ -3696,10 +3696,10 @@ BluetoothDBusService::GetServiceChannel(const BluetoothAddress& aDeviceAddress, // Even though we are on the main thread already, we need to dispatch a // runnable here. OnGetServiceChannel needs mRunnable to be set, which // happens after GetServiceChannel returns. - RefPtr r = new OnGetServiceChannelRunnable(aDeviceAddress, - aServiceUUID, - 1, - aManager); + RefPtr r = new OnGetServiceChannelRunnable(aDeviceAddress, + aServiceUUID, + 1, + aManager); NS_DispatchToMainThread(r); #endif diff --git a/dom/bluetooth/bluez/BluetoothHfpManager.cpp b/dom/bluetooth/bluez/BluetoothHfpManager.cpp index 3ad8b11dc21a..1ec241b56b15 100644 --- a/dom/bluetooth/bluez/BluetoothHfpManager.cpp +++ b/dom/bluetooth/bluez/BluetoothHfpManager.cpp @@ -1490,7 +1490,7 @@ BluetoothHfpManager::HandleCallStateChanged(uint32_t aCallIndex, } mCurrentCallArray[aCallIndex].mNumber = aNumber; - RefPtr sendRingTask; + RefPtr sendRingTask; nsString address; switch (aCallState) { diff --git a/dom/bluetooth/bluez/BluetoothOppManager.cpp b/dom/bluetooth/bluez/BluetoothOppManager.cpp index 0ae7c0d31616..3f1d7421fd7c 100644 --- a/dom/bluetooth/bluez/BluetoothOppManager.cpp +++ b/dom/bluetooth/bluez/BluetoothOppManager.cpp @@ -97,7 +97,7 @@ BluetoothOppManager::Observe(nsISupports* aSubject, return NS_ERROR_UNEXPECTED; } -class SendSocketDataTask : public nsRunnable +class SendSocketDataTask : public Runnable { public: SendSocketDataTask(UniquePtr aStream, uint32_t aSize) @@ -121,7 +121,7 @@ private: uint32_t mSize; }; -class ReadFileTask : public nsRunnable +class ReadFileTask : public Runnable { public: ReadFileTask(nsIInputStream* aInputStream, diff --git a/dom/bluetooth/common/BluetoothReplyRunnable.h b/dom/bluetooth/common/BluetoothReplyRunnable.h index 9ffc4cf1e1d0..158f9724f5a9 100644 --- a/dom/bluetooth/common/BluetoothReplyRunnable.h +++ b/dom/bluetooth/common/BluetoothReplyRunnable.h @@ -25,7 +25,7 @@ BEGIN_BLUETOOTH_NAMESPACE class BluetoothReply; -class BluetoothReplyRunnable : public nsRunnable +class BluetoothReplyRunnable : public Runnable { public: NS_DECL_NSIRUNNABLE @@ -96,7 +96,7 @@ protected: } }; -class BluetoothReplyTaskQueue : public nsRunnable +class BluetoothReplyTaskQueue : public Runnable { public: NS_DECL_NSIRUNNABLE diff --git a/dom/bluetooth/common/BluetoothService.cpp b/dom/bluetooth/common/BluetoothService.cpp index 0c050e5f1413..d16ad7adacdc 100644 --- a/dom/bluetooth/common/BluetoothService.cpp +++ b/dom/bluetooth/common/BluetoothService.cpp @@ -434,7 +434,7 @@ BluetoothService::StartBluetooth(bool aIsStartup, } } else { BT_WARNING("Bluetooth has already been enabled before."); - RefPtr runnable = new BluetoothService::ToggleBtAck(true); + RefPtr runnable = new BluetoothService::ToggleBtAck(true); if (NS_FAILED(NS_DispatchToMainThread(runnable))) { BT_WARNING("Failed to dispatch to main thread!"); } @@ -465,7 +465,7 @@ BluetoothService::StopBluetooth(bool aIsStartup, } } else { BT_WARNING("Bluetooth has already been enabled/disabled before."); - RefPtr runnable = new BluetoothService::ToggleBtAck(false); + RefPtr runnable = new BluetoothService::ToggleBtAck(false); if (NS_FAILED(NS_DispatchToMainThread(runnable))) { BT_WARNING("Failed to dispatch to main thread!"); } diff --git a/dom/bluetooth/common/BluetoothService.h b/dom/bluetooth/common/BluetoothService.h index fb124bae5516..c042792323a0 100644 --- a/dom/bluetooth/common/BluetoothService.h +++ b/dom/bluetooth/common/BluetoothService.h @@ -41,7 +41,7 @@ class BluetoothService : public nsIObserver friend class StartupTask; public: - class ToggleBtAck : public nsRunnable + class ToggleBtAck : public Runnable { public: ToggleBtAck(bool aEnabled); diff --git a/dom/bluetooth/common/webapi/BluetoothGattServer.cpp b/dom/bluetooth/common/webapi/BluetoothGattServer.cpp index dd02a3866507..02cc229d7e7e 100644 --- a/dom/bluetooth/common/webapi/BluetoothGattServer.cpp +++ b/dom/bluetooth/common/webapi/BluetoothGattServer.cpp @@ -897,9 +897,9 @@ private: { mService->AssignAppUuid(mServer->mAppUuid); - RefPtr runnable = new AddServiceTaskQueue(mServer, - mService, - mPromise); + RefPtr runnable = new AddServiceTaskQueue(mServer, + mService, + mPromise); nsresult rv = NS_DispatchToMainThread(runnable.forget()); if (NS_WARN_IF(NS_FAILED(rv))) { diff --git a/dom/camera/TestGonkCameraHardware.cpp b/dom/camera/TestGonkCameraHardware.cpp index 3b1c7feedae1..ce5549b4b7c6 100644 --- a/dom/camera/TestGonkCameraHardware.cpp +++ b/dom/camera/TestGonkCameraHardware.cpp @@ -153,7 +153,7 @@ TestGonkCameraHardwareListener::HandleEvent(nsIDOMEvent* aEvent) OnTakePictureError(mTarget); } else if (errorType.EqualsLiteral("system")) { if (!NS_WARN_IF(!mCameraThread)) { - class DeferredSystemFailure : public nsRunnable + class DeferredSystemFailure : public Runnable { public: DeferredSystemFailure(nsGonkCameraControl* aTarget) @@ -228,7 +228,7 @@ TestGonkCameraHardwareListener::HandleEvent(nsIDOMEvent* aEvent) NS_IMPL_ISUPPORTS(TestGonkCameraHardwareListener, nsIDOMEventListener) -class TestGonkCameraHardware::ControlMessage : public nsRunnable +class TestGonkCameraHardware::ControlMessage : public Runnable { public: ControlMessage(TestGonkCameraHardware* aTestHw) diff --git a/dom/fmradio/FMRadioService.h b/dom/fmradio/FMRadioService.h index 1f5201c36548..3509527741dd 100644 --- a/dom/fmradio/FMRadioService.h +++ b/dom/fmradio/FMRadioService.h @@ -20,7 +20,7 @@ BEGIN_FMRADIO_NAMESPACE -class FMRadioReplyRunnable : public nsRunnable +class FMRadioReplyRunnable : public Runnable { public: FMRadioReplyRunnable() : mResponseType(SuccessResponse()) {} diff --git a/dom/ipc/NuwaChild.cpp b/dom/ipc/NuwaChild.cpp index f01eab651b6c..c56ece8a00ec 100644 --- a/dom/ipc/NuwaChild.cpp +++ b/dom/ipc/NuwaChild.cpp @@ -35,7 +35,7 @@ namespace dom { namespace { -class CallNuwaSpawn: public nsRunnable +class CallNuwaSpawn: public Runnable { public: NS_IMETHOD Run() @@ -185,7 +185,7 @@ GetProtoFdInfos(NuwaProtoFdInfo* aInfoList, *aInfoSize = i; } -class RunAddNewIPCProcess : public nsRunnable +class RunAddNewIPCProcess : public mozilla::Runnable { public: RunAddNewIPCProcess(pid_t aPid, diff --git a/dom/nfc/gonk/NfcService.cpp b/dom/nfc/gonk/NfcService.cpp index e7430e4fce16..a6d7cf277e64 100644 --- a/dom/nfc/gonk/NfcService.cpp +++ b/dom/nfc/gonk/NfcService.cpp @@ -171,7 +171,7 @@ NfcConsumer::Send(const CommandOptions& aOptions) } // Runnable used dispatch the NfcEventOptions on the main thread. -class NfcConsumer::DispatchNfcEventRunnable final : public nsRunnable +class NfcConsumer::DispatchNfcEventRunnable final : public Runnable { public: DispatchNfcEventRunnable(NfcService* aNfcService, const EventOptions& aEvent) @@ -392,7 +392,7 @@ NfcConsumer::OnConnectSuccess(int aIndex) } } -class NfcConsumer::ShutdownServiceRunnable final : public nsRunnable +class NfcConsumer::ShutdownServiceRunnable final : public Runnable { public: ShutdownServiceRunnable(NfcService* aNfcService) @@ -464,7 +464,7 @@ NfcService::FactoryCreate() /** * |StartConsumerRunnable| calls |NfcConsumer::Start| on the NFC thread. */ -class NfcService::StartConsumerRunnable final : public nsRunnable +class NfcService::StartConsumerRunnable final : public Runnable { public: StartConsumerRunnable(NfcConsumer* aNfcConsumer) @@ -517,7 +517,7 @@ NfcService::Start(nsINfcGonkEventListener* aListener) * thread on the main thread. This has to be down after shutting * down the NFC consumer on the NFC thread. */ -class NfcService::CleanupRunnable final : public nsRunnable +class NfcService::CleanupRunnable final : public Runnable { public: CleanupRunnable(NfcConsumer* aNfcConsumer, @@ -551,7 +551,7 @@ private: * NFC thread. Optionally, it can dispatch a |CleanupRunnable| to * the main thread for cleaning up the NFC resources. */ -class NfcService::ShutdownConsumerRunnable final : public nsRunnable +class NfcService::ShutdownConsumerRunnable final : public Runnable { public: ShutdownConsumerRunnable(NfcConsumer* aNfcConsumer, bool aCleanUp) @@ -603,7 +603,7 @@ NfcService::Shutdown() /** * |SendRunnable| calls |NfcConsumer::Send| on the NFC thread. */ -class NfcService::SendRunnable final : public nsRunnable +class NfcService::SendRunnable final : public Runnable { public: SendRunnable(NfcConsumer* aNfcConsumer, const CommandOptions& aOptions) diff --git a/dom/system/gonk/AutoMounterSetting.cpp b/dom/system/gonk/AutoMounterSetting.cpp index a78f69243898..72c8dd9210e6 100644 --- a/dom/system/gonk/AutoMounterSetting.cpp +++ b/dom/system/gonk/AutoMounterSetting.cpp @@ -161,7 +161,7 @@ AutoMounterSetting::StatusStr(int32_t aStatus) return "??? Unknown ???"; } -class CheckVolumeSettingsRunnable : public nsRunnable +class CheckVolumeSettingsRunnable : public Runnable { public: CheckVolumeSettingsRunnable(const nsACString& aVolumeName) @@ -194,7 +194,7 @@ AutoMounterSetting::CheckVolumeSettings(const nsACString& aVolumeName) NS_DispatchToMainThread(new CheckVolumeSettingsRunnable(aVolumeName)); } -class SetStatusRunnable : public nsRunnable +class SetStatusRunnable : public Runnable { public: SetStatusRunnable(int32_t aStatus) : mStatus(aStatus) {} diff --git a/dom/system/gonk/GonkGPSGeolocationProvider.cpp b/dom/system/gonk/GonkGPSGeolocationProvider.cpp index 6cea3b036227..6d8d4c55ee17 100644 --- a/dom/system/gonk/GonkGPSGeolocationProvider.cpp +++ b/dom/system/gonk/GonkGPSGeolocationProvider.cpp @@ -105,7 +105,7 @@ GonkGPSGeolocationProvider::LocationCallback(GpsLocation* location) return; } - class UpdateLocationEvent : public nsRunnable { + class UpdateLocationEvent : public Runnable { public: UpdateLocationEvent(nsGeoPosition* aPosition) : mPosition(aPosition) @@ -160,7 +160,7 @@ GonkGPSGeolocationProvider::LocationCallback(GpsLocation* location) #endif } -class NotifyObserversGPSTask final : public nsRunnable +class NotifyObserversGPSTask final : public Runnable { public: explicit NotifyObserversGPSTask(const char16_t* aData) @@ -271,7 +271,7 @@ GonkGPSGeolocationProvider::NmeaCallback(GpsUtcTime timestamp, const char* nmea, void GonkGPSGeolocationProvider::SetCapabilitiesCallback(uint32_t capabilities) { - class UpdateCapabilitiesEvent : public nsRunnable { + class UpdateCapabilitiesEvent : public Runnable { public: UpdateCapabilitiesEvent(uint32_t aCapabilities) : mCapabilities(aCapabilities) @@ -339,7 +339,7 @@ GonkGPSGeolocationProvider::AGPSStatusCallback(AGpsStatus* status) { MOZ_ASSERT(status); - class AGPSStatusEvent : public nsRunnable { + class AGPSStatusEvent : public Runnable { public: AGPSStatusEvent(AGpsStatusValue aStatus) : mStatus(aStatus) @@ -368,7 +368,7 @@ GonkGPSGeolocationProvider::AGPSStatusCallback(AGpsStatus* status) void GonkGPSGeolocationProvider::AGPSRILSetIDCallback(uint32_t flags) { - class RequestSetIDEvent : public nsRunnable { + class RequestSetIDEvent : public Runnable { public: RequestSetIDEvent(uint32_t flags) : mFlags(flags) @@ -389,7 +389,7 @@ GonkGPSGeolocationProvider::AGPSRILSetIDCallback(uint32_t flags) void GonkGPSGeolocationProvider::AGPSRILRefLocCallback(uint32_t flags) { - class RequestRefLocEvent : public nsRunnable { + class RequestRefLocEvent : public Runnable { public: RequestRefLocEvent() {} diff --git a/dom/system/gonk/MozMtpDatabase.cpp b/dom/system/gonk/MozMtpDatabase.cpp index 47696265d801..63feed516861 100644 --- a/dom/system/gonk/MozMtpDatabase.cpp +++ b/dom/system/gonk/MozMtpDatabase.cpp @@ -255,7 +255,7 @@ MozMtpDatabase::UpdateEntry(MtpObjectHandle aHandle, DeviceStorageFile* aFile) } -class MtpWatcherNotifyRunnable final : public nsRunnable +class MtpWatcherNotifyRunnable final : public Runnable { public: MtpWatcherNotifyRunnable(nsACString& aStorageName, diff --git a/dom/system/gonk/MozMtpServer.cpp b/dom/system/gonk/MozMtpServer.cpp index 46ae58c67bfe..d1b195f9268f 100644 --- a/dom/system/gonk/MozMtpServer.cpp +++ b/dom/system/gonk/MozMtpServer.cpp @@ -41,7 +41,7 @@ BEGIN_MTP_NAMESPACE static const char* kMtpWatcherUpdate = "mtp-watcher-update"; -class MtpWatcherUpdateRunnable final : public nsRunnable +class MtpWatcherUpdateRunnable final : public Runnable { public: MtpWatcherUpdateRunnable(MozMtpDatabase* aMozMtpDatabase, @@ -142,7 +142,7 @@ private: NS_IMPL_ISUPPORTS(MtpWatcherUpdate, nsIObserver) static StaticRefPtr sMtpWatcherUpdate; -class AllocMtpWatcherUpdateRunnable final : public nsRunnable +class AllocMtpWatcherUpdateRunnable final : public Runnable { public: AllocMtpWatcherUpdateRunnable(MozMtpServer* aMozMtpServer) @@ -160,7 +160,7 @@ private: RefPtr mMozMtpServer; }; -class FreeMtpWatcherUpdateRunnable final : public nsRunnable +class FreeMtpWatcherUpdateRunnable final : public Runnable { public: FreeMtpWatcherUpdateRunnable(MozMtpServer* aMozMtpServer) @@ -178,7 +178,7 @@ private: RefPtr mMozMtpServer; }; -class MtpServerRunnable : public nsRunnable +class MtpServerRunnable : public Runnable { public: MtpServerRunnable(int aMtpUsbFd, MozMtpServer* aMozMtpServer) diff --git a/dom/system/gonk/NetworkWorker.cpp b/dom/system/gonk/NetworkWorker.cpp index 1608d688b2a8..d217590b48ab 100644 --- a/dom/system/gonk/NetworkWorker.cpp +++ b/dom/system/gonk/NetworkWorker.cpp @@ -29,7 +29,7 @@ StaticRefPtr gNetworkWorker; static nsAutoPtr gNetworkUtils; // Runnable used dispatch command result on the main thread. -class NetworkResultDispatcher : public nsRunnable +class NetworkResultDispatcher : public Runnable { public: NetworkResultDispatcher(const NetworkResultOptions& aResult) @@ -52,7 +52,7 @@ private: }; // Runnable used dispatch netd command on the worker thread. -class NetworkCommandDispatcher : public nsRunnable +class NetworkCommandDispatcher : public Runnable { public: NetworkCommandDispatcher(const NetworkParams& aParams) @@ -75,7 +75,7 @@ private: }; // Runnable used dispatch netd result on the worker thread. -class NetdEventRunnable : public nsRunnable +class NetdEventRunnable : public Runnable { public: NetdEventRunnable(NetdCommand* aCommand) diff --git a/dom/system/gonk/VolumeServiceTest.cpp b/dom/system/gonk/VolumeServiceTest.cpp index 0f366778e412..e78f81a9d88e 100644 --- a/dom/system/gonk/VolumeServiceTest.cpp +++ b/dom/system/gonk/VolumeServiceTest.cpp @@ -157,7 +157,7 @@ VolumeTestObserver::Observe(nsISupports* aSubject, return NS_OK; } -class InitVolumeServiceTestIO : public nsRunnable +class InitVolumeServiceTestIO : public Runnable { public: NS_IMETHOD Run() diff --git a/dom/system/gonk/mozstumbler/MozStumbler.cpp b/dom/system/gonk/mozstumbler/MozStumbler.cpp index d857ea921233..7eb2f9d04d12 100644 --- a/dom/system/gonk/mozstumbler/MozStumbler.cpp +++ b/dom/system/gonk/mozstumbler/MozStumbler.cpp @@ -28,7 +28,7 @@ using namespace mozilla::dom; NS_IMPL_ISUPPORTS(StumblerInfo, nsICellInfoListCallback, nsIWifiScanResultsReady) -class RequestCellInfoEvent : public nsRunnable { +class RequestCellInfoEvent : public Runnable { public: RequestCellInfoEvent(StumblerInfo *callback) : mRequestCallback(callback) diff --git a/dom/system/gonk/mozstumbler/UploadStumbleRunnable.h b/dom/system/gonk/mozstumbler/UploadStumbleRunnable.h index a9ea83e37dbe..462665a869de 100644 --- a/dom/system/gonk/mozstumbler/UploadStumbleRunnable.h +++ b/dom/system/gonk/mozstumbler/UploadStumbleRunnable.h @@ -17,7 +17,7 @@ class nsIInputStream; This runnable is managed by WriteStumbleOnThread only, see that class for how this is scheduled. */ -class UploadStumbleRunnable final : public nsRunnable +class UploadStumbleRunnable final : public Runnable { public: explicit UploadStumbleRunnable(nsIInputStream* aUploadInputStream); diff --git a/dom/system/gonk/mozstumbler/WriteStumbleOnThread.cpp b/dom/system/gonk/mozstumbler/WriteStumbleOnThread.cpp index b85690f7b279..58dacac6708b 100644 --- a/dom/system/gonk/mozstumbler/WriteStumbleOnThread.cpp +++ b/dom/system/gonk/mozstumbler/WriteStumbleOnThread.cpp @@ -25,7 +25,7 @@ WriteStumbleOnThread::UploadFreqGuard WriteStumbleOnThread::sUploadFreqGuard = { #define FILENAME_COMPLETED NS_LITERAL_CSTRING("stumbles.done.json.gz") #define OUTPUT_DIR NS_LITERAL_CSTRING("mozstumbler") -class DeleteRunnable : public nsRunnable +class DeleteRunnable : public Runnable { public: DeleteRunnable() {} diff --git a/dom/system/gonk/mozstumbler/WriteStumbleOnThread.h b/dom/system/gonk/mozstumbler/WriteStumbleOnThread.h index 35cb6def689a..038e1c77ce45 100644 --- a/dom/system/gonk/mozstumbler/WriteStumbleOnThread.h +++ b/dom/system/gonk/mozstumbler/WriteStumbleOnThread.h @@ -35,7 +35,7 @@ class DeleteRunnable; This thread is guarded so that only one instance is active (see the mozilla::Atomics used for this). */ -class WriteStumbleOnThread : public nsRunnable +class WriteStumbleOnThread : public mozilla::Runnable { public: explicit WriteStumbleOnThread(const nsCString& aDesc) diff --git a/dom/system/gonk/nsVolumeService.cpp b/dom/system/gonk/nsVolumeService.cpp index 6fa93057c135..379c143f4269 100644 --- a/dom/system/gonk/nsVolumeService.cpp +++ b/dom/system/gonk/nsVolumeService.cpp @@ -505,7 +505,7 @@ nsVolumeService::RemoveVolumeByName(const nsAString& aName) * The UpdateVolumeRunnable creates an nsVolume and updates the main thread * data structure while running on the main thread. */ -class UpdateVolumeRunnable : public nsRunnable +class UpdateVolumeRunnable : public Runnable { public: UpdateVolumeRunnable(nsVolumeService* aVolumeService, const Volume* aVolume) diff --git a/dom/wifi/WifiProxyService.cpp b/dom/wifi/WifiProxyService.cpp index 4e2ee72af9f0..cee8757b5207 100644 --- a/dom/wifi/WifiProxyService.cpp +++ b/dom/wifi/WifiProxyService.cpp @@ -32,7 +32,7 @@ static StaticRefPtr gWifiProxyService; static UniquePtr gWpaSupplicant; // Runnable used dispatch the WaitForEvent result on the main thread. -class WifiEventDispatcher : public nsRunnable +class WifiEventDispatcher : public Runnable { public: WifiEventDispatcher(const nsAString& aEvent, const nsACString& aInterface) @@ -55,7 +55,7 @@ private: }; // Runnable used to call WaitForEvent on the event thread. -class EventRunnable : public nsRunnable +class EventRunnable : public Runnable { public: EventRunnable(const nsACString& aInterface) @@ -87,7 +87,7 @@ private: }; // Runnable used dispatch the Command result on the main thread. -class WifiResultDispatcher : public nsRunnable +class WifiResultDispatcher : public Runnable { public: WifiResultDispatcher(WifiResultOptions& aResult, const nsACString& aInterface) @@ -110,7 +110,7 @@ private: }; // Runnable used to call SendCommand on the control thread. -class ControlRunnable : public nsRunnable +class ControlRunnable : public Runnable { public: ControlRunnable(CommandOptions aOptions, const nsACString& aInterface) diff --git a/hal/gonk/GonkDiskSpaceWatcher.cpp b/hal/gonk/GonkDiskSpaceWatcher.cpp index 7fe322767561..8fa9fe9ff9a3 100644 --- a/hal/gonk/GonkDiskSpaceWatcher.cpp +++ b/hal/gonk/GonkDiskSpaceWatcher.cpp @@ -119,7 +119,7 @@ static GonkDiskSpaceWatcher* gHalDiskSpaceWatcher = nullptr; static const char kWatchedPath[] = "/data"; // Helper class to dispatch calls to xpcom on the main thread. -class DiskSpaceNotifier : public nsRunnable +class DiskSpaceNotifier : public Runnable { public: DiskSpaceNotifier(const bool aIsDiskFull, const uint64_t aFreeSpace) : @@ -139,7 +139,7 @@ private: }; // Helper runnable to delete the watcher on the main thread. -class DiskSpaceCleaner : public nsRunnable +class DiskSpaceCleaner : public Runnable { public: NS_IMETHOD Run() diff --git a/hal/gonk/GonkFMRadio.cpp b/hal/gonk/GonkFMRadio.cpp index a88d544f6001..d33c38faee82 100644 --- a/hal/gonk/GonkFMRadio.cpp +++ b/hal/gonk/GonkFMRadio.cpp @@ -84,7 +84,7 @@ setControl(uint32_t id, int32_t value) return ioctl(sRadioFD, VIDIOC_S_CTRL, &control); } -class RadioUpdate : public nsRunnable { +class RadioUpdate : public Runnable { hal::FMRadioOperation mOp; hal::FMRadioOperationStatus mStatus; public: diff --git a/hal/gonk/GonkHal.cpp b/hal/gonk/GonkHal.cpp index 10035370d9b1..8966c2029a60 100644 --- a/hal/gonk/GonkHal.cpp +++ b/hal/gonk/GonkHal.cpp @@ -423,7 +423,7 @@ CancelVibrate(const hal::WindowIdentifier &) namespace { -class BatteryUpdater : public nsRunnable { +class BatteryUpdater : public Runnable { public: NS_IMETHOD Run() { @@ -1043,7 +1043,7 @@ int AlarmData::sNextGeneration = 0; AlarmData* sAlarmData = nullptr; -class AlarmFiredEvent : public nsRunnable { +class AlarmFiredEvent : public Runnable { public: AlarmFiredEvent(int aGeneration) : mGeneration(aGeneration) {} @@ -1976,7 +1976,7 @@ namespace { * We have to run this from the main thread since preferences can only be read on * main thread. */ -class SetThreadPriorityRunnable : public nsRunnable +class SetThreadPriorityRunnable : public Runnable { public: SetThreadPriorityRunnable(pid_t aThreadId, hal::ThreadPriority aThreadPriority) diff --git a/hal/gonk/GonkSensor.cpp b/hal/gonk/GonkSensor.cpp index f361e064be2f..4f3ea8a4eb9b 100644 --- a/hal/gonk/GonkSensor.cpp +++ b/hal/gonk/GonkSensor.cpp @@ -126,7 +126,7 @@ SensorseventStatus(const sensors_event_t& data) return SENSOR_STATUS_UNRELIABLE; } -class SensorRunnable : public nsRunnable +class SensorRunnable : public Runnable { public: SensorRunnable(const sensors_event_t& data, const sensor_t* sensors, ssize_t size) diff --git a/hal/gonk/GonkSwitch.cpp b/hal/gonk/GonkSwitch.cpp index 1e8ee81f7199..52ee7d5b88f6 100644 --- a/hal/gonk/GonkSwitch.cpp +++ b/hal/gonk/GonkSwitch.cpp @@ -212,7 +212,7 @@ protected: typedef nsTArray > SwitchHandlerArray; -class SwitchEventRunnable : public nsRunnable +class SwitchEventRunnable : public Runnable { public: SwitchEventRunnable(SwitchEvent& aEvent) : mEvent(aEvent) diff --git a/ipc/hal/DaemonRunnables.h b/ipc/hal/DaemonRunnables.h index d649ce303b5e..ae55838cfb34 100644 --- a/ipc/hal/DaemonRunnables.h +++ b/ipc/hal/DaemonRunnables.h @@ -16,7 +16,7 @@ namespace ipc { namespace details { -class DaemonRunnable : public nsRunnable +class DaemonRunnable : public Runnable { protected: DaemonRunnable() = default; diff --git a/ipc/netd/Netd.cpp b/ipc/netd/Netd.cpp index 85afc720564d..aa255f170b47 100644 --- a/ipc/netd/Netd.cpp +++ b/ipc/netd/Netd.cpp @@ -31,7 +31,7 @@ namespace { RefPtr gNetdClient; RefPtr gNetdConsumer; -class StopNetdConsumer : public nsRunnable { +class StopNetdConsumer : public mozilla::Runnable { public: NS_IMETHOD Run() { diff --git a/netwerk/protocol/rtsp/RtspChannelChild.cpp b/netwerk/protocol/rtsp/RtspChannelChild.cpp index 235c2f6ef468..74f832e0aa5e 100644 --- a/netwerk/protocol/rtsp/RtspChannelChild.cpp +++ b/netwerk/protocol/rtsp/RtspChannelChild.cpp @@ -82,7 +82,7 @@ RtspChannelChild::GetContentType(nsACString& aContentType) return NS_OK; } -class CallListenerOnStartRequestEvent : public nsRunnable +class CallListenerOnStartRequestEvent : public Runnable { public: CallListenerOnStartRequestEvent(nsIStreamListener *aListener, @@ -185,7 +185,7 @@ RtspChannelChild::OnDataAvailable(nsIRequest *aRequest, //----------------------------------------------------------------------------- // nsBaseChannel::nsIChannel::nsIRequest //----------------------------------------------------------------------------- -class CallListenerOnStopRequestEvent : public nsRunnable +class CallListenerOnStopRequestEvent : public Runnable { public: CallListenerOnStopRequestEvent(nsIStreamListener *aListener, diff --git a/netwerk/protocol/rtsp/controller/RtspController.cpp b/netwerk/protocol/rtsp/controller/RtspController.cpp index bea6b3403554..48a663e410f6 100644 --- a/netwerk/protocol/rtsp/controller/RtspController.cpp +++ b/netwerk/protocol/rtsp/controller/RtspController.cpp @@ -195,7 +195,7 @@ RtspController::AsyncOpen(nsIStreamingProtocolListener *aListener) //----------------------------------------------------------------------------- // nsIStreamingProtocolListener //----------------------------------------------------------------------------- -class SendMediaDataTask : public nsRunnable +class SendMediaDataTask : public Runnable { public: SendMediaDataTask(nsIStreamingProtocolListener *listener, @@ -245,7 +245,7 @@ RtspController::OnMediaDataAvailable(uint8_t index, return NS_ERROR_NOT_AVAILABLE; } -class SendOnConnectedTask : public nsRunnable +class SendOnConnectedTask : public Runnable { public: SendOnConnectedTask(nsIStreamingProtocolListener *listener, @@ -284,7 +284,7 @@ RtspController::OnConnected(uint8_t index, return NS_ERROR_NOT_AVAILABLE; } -class SendOnDisconnectedTask : public nsRunnable +class SendOnDisconnectedTask : public Runnable { public: SendOnDisconnectedTask(nsIStreamingProtocolListener *listener, diff --git a/netwerk/protocol/rtsp/controller/RtspControllerChild.cpp b/netwerk/protocol/rtsp/controller/RtspControllerChild.cpp index 5dd847c2ff32..2d4a66816578 100644 --- a/netwerk/protocol/rtsp/controller/RtspControllerChild.cpp +++ b/netwerk/protocol/rtsp/controller/RtspControllerChild.cpp @@ -254,7 +254,7 @@ enum IPCEvent SendPlaybackEndedEvent }; -class SendIPCEvent : public nsRunnable +class SendIPCEvent : public Runnable { public: SendIPCEvent(RtspControllerChild *aController, IPCEvent aEvent) diff --git a/toolkit/xre/EventTracer.cpp b/toolkit/xre/EventTracer.cpp index 71a54240057d..b6e28971ecd7 100644 --- a/toolkit/xre/EventTracer.cpp +++ b/toolkit/xre/EventTracer.cpp @@ -86,7 +86,7 @@ struct TracerStartClosure { }; #ifdef MOZ_WIDGET_GONK -class EventLoopLagDispatcher : public nsRunnable +class EventLoopLagDispatcher : public Runnable { public: explicit EventLoopLagDispatcher(int aLag) diff --git a/widget/gonk/GonkPermission.cpp b/widget/gonk/GonkPermission.cpp index 7dab1f095f5a..056670ab3c5c 100644 --- a/widget/gonk/GonkPermission.cpp +++ b/widget/gonk/GonkPermission.cpp @@ -39,7 +39,7 @@ using namespace mozilla; // Checking permissions needs to happen on the main thread, but the // binder callback is called on a special binder thread, so we use // this runnable for that. -class GonkPermissionChecker : public nsRunnable { +class GonkPermissionChecker : public Runnable { int32_t mPid; bool mCanUseCamera; diff --git a/widget/gonk/HwcComposer2D.cpp b/widget/gonk/HwcComposer2D.cpp index eaf690245b6c..ae2eee5ec4ce 100644 --- a/widget/gonk/HwcComposer2D.cpp +++ b/widget/gonk/HwcComposer2D.cpp @@ -206,7 +206,7 @@ HwcComposer2D::Invalidate() } namespace { -class HotplugEvent : public nsRunnable { +class HotplugEvent : public Runnable { public: HotplugEvent(GonkDisplay::DisplayType aType, bool aConnected) : mType(aType) diff --git a/widget/gonk/WidgetTraceEvent.cpp b/widget/gonk/WidgetTraceEvent.cpp index ac14cfa0afe5..558d9313e3dd 100644 --- a/widget/gonk/WidgetTraceEvent.cpp +++ b/widget/gonk/WidgetTraceEvent.cpp @@ -13,7 +13,7 @@ using mozilla::Mutex; using mozilla::MutexAutoLock; namespace mozilla { - class TracerRunnable : public nsRunnable { + class TracerRunnable : public Runnable { public: TracerRunnable() { mTracerLock = new Mutex("TracerRunnable"); diff --git a/widget/gonk/nativewindow/FakeSurfaceComposer.cpp b/widget/gonk/nativewindow/FakeSurfaceComposer.cpp index fe4d2581d904..a2e7a513d51f 100644 --- a/widget/gonk/nativewindow/FakeSurfaceComposer.cpp +++ b/widget/gonk/nativewindow/FakeSurfaceComposer.cpp @@ -101,7 +101,7 @@ sp FakeSurfaceComposer::createGraphicBufferAlloc() return gba; } -class DestroyDisplayRunnable : public nsRunnable { +class DestroyDisplayRunnable : public Runnable { public: DestroyDisplayRunnable(FakeSurfaceComposer* aComposer, ssize_t aIndex) : mComposer(aComposer), mIndex(aIndex) { } diff --git a/widget/gonk/nsAppShell.cpp b/widget/gonk/nsAppShell.cpp index 6f3efcf8ca53..5137a1e52d09 100644 --- a/widget/gonk/nsAppShell.cpp +++ b/widget/gonk/nsAppShell.cpp @@ -354,7 +354,7 @@ KeyEventDispatcher::DispatchKeyUpEvent() DispatchKeyEventInternal(eKeyUp); } -class SwitchEventRunnable : public nsRunnable { +class SwitchEventRunnable : public mozilla::Runnable { public: SwitchEventRunnable(hal::SwitchEvent& aEvent) : mEvent(aEvent) {} diff --git a/widget/gonk/nsScreenManagerGonk.cpp b/widget/gonk/nsScreenManagerGonk.cpp index 051cb124373f..80e8fd5afa24 100644 --- a/widget/gonk/nsScreenManagerGonk.cpp +++ b/widget/gonk/nsScreenManagerGonk.cpp @@ -56,7 +56,7 @@ using namespace mozilla::dom; namespace { -class ScreenOnOffEvent : public nsRunnable { +class ScreenOnOffEvent : public mozilla::Runnable { public: ScreenOnOffEvent(bool on) : mIsOn(on) @@ -974,7 +974,7 @@ private: NS_IMPL_ISUPPORTS(DisplayInfo, nsIDisplayInfo, nsISupports) -class NotifyTask : public nsRunnable { +class NotifyTask : public mozilla::Runnable { public: NotifyTask(uint32_t aId, bool aConnected) : mDisplayInfo(new DisplayInfo(aId, aConnected)) diff --git a/widget/gonk/nsScreenManagerGonk.h b/widget/gonk/nsScreenManagerGonk.h index ba3b10f03231..33ef5edb8927 100644 --- a/widget/gonk/nsScreenManagerGonk.h +++ b/widget/gonk/nsScreenManagerGonk.h @@ -31,7 +31,6 @@ #include -class nsRunnable; class nsWindow; namespace android { @@ -40,6 +39,7 @@ namespace android { }; namespace mozilla { + class Runnable; namespace gl { class GLContext; } @@ -216,8 +216,8 @@ protected: bool mInitialized; nsTArray> mScreens; - RefPtr mScreenOnEvent; - RefPtr mScreenOffEvent; + RefPtr mScreenOnEvent; + RefPtr mScreenOffEvent; #if ANDROID_VERSION >= 19 bool mDisplayEnabled; diff --git a/widget/gonk/nsWindow.cpp b/widget/gonk/nsWindow.cpp index d76607a5deaf..c98417dc4c57 100644 --- a/widget/gonk/nsWindow.cpp +++ b/widget/gonk/nsWindow.cpp @@ -161,7 +161,7 @@ nsWindow::DispatchTouchInput(MultiTouchInput& aInput) gFocusedWindow->DispatchTouchInputViaAPZ(aInput); } -class DispatchTouchInputOnMainThread : public nsRunnable +class DispatchTouchInputOnMainThread : public mozilla::Runnable { public: DispatchTouchInputOnMainThread(const MultiTouchInput& aInput,