Bug 914944 - Move PowerManager to mozilla::dom r=Ms2ger

This commit is contained in:
David Zbarsky 2013-09-11 10:35:04 -04:00
parent 6fa91fd6df
commit 584fd59ee6
7 changed files with 11 additions and 16 deletions

View File

@ -25,7 +25,7 @@
#include "mozilla/Preferences.h"
#include "mozilla/Telemetry.h"
#include "BatteryManager.h"
#include "PowerManager.h"
#include "mozilla/dom/PowerManager.h"
#include "nsIDOMWakeLock.h"
#include "nsIPowerManagerService.h"
#include "mozilla/dom/MobileMessageManager.h"
@ -76,8 +76,6 @@
#include "mozilla/dom/NavigatorBinding.h"
using namespace mozilla::dom::power;
// This should not be in the namespace.
DOMCI_DATA(Navigator, mozilla::dom::Navigator)
@ -1100,7 +1098,7 @@ Navigator::GetBattery(ErrorResult& aRv)
return mBatteryManager;
}
power::PowerManager*
PowerManager*
Navigator::GetMozPower(ErrorResult& aRv)
{
if (!mPowerManager) {

View File

@ -97,9 +97,7 @@ class BluetoothManager;
class Voicemail;
#endif
namespace power {
class PowerManager;
} // namespace power
namespace time {
class TimeManager;
@ -199,7 +197,7 @@ public:
{
aRv = GetBuildID(aBuildID);
}
power::PowerManager* GetMozPower(ErrorResult& aRv);
PowerManager* GetMozPower(ErrorResult& aRv);
bool JavaEnabled(ErrorResult& aRv);
bool TaintEnabled()
{
@ -327,7 +325,7 @@ private:
#ifdef MOZ_B2G_FM
nsRefPtr<FMRadio> mFMRadio;
#endif
nsRefPtr<power::PowerManager> mPowerManager;
nsRefPtr<PowerManager> mPowerManager;
nsRefPtr<MobileMessageManager> mMobileMessageManager;
#ifdef MOZ_B2G_RIL
nsRefPtr<telephony::Telephony> mTelephony;

View File

@ -777,7 +777,7 @@ DOMInterfaces = {
},
'MozPowerManager': {
'nativeType': 'mozilla::dom::power::PowerManager',
'nativeType': 'mozilla::dom::PowerManager',
},
'MozStkCommandEvent' : {

View File

@ -3,8 +3,9 @@
* 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/PowerManager.h"
#include "mozilla/Hal.h"
#include "PowerManager.h"
#include "WakeLock.h"
#include "nsDOMClassInfoID.h"
#include "nsIDOMWakeLockListener.h"
@ -19,7 +20,6 @@
namespace mozilla {
namespace dom {
namespace power {
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PowerManager)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
@ -205,6 +205,5 @@ PowerManager::CreateInstance(nsPIDOMWindow* aWindow)
return powerManager.forget();
}
} // power
} // dom
} // mozilla

View File

@ -19,7 +19,6 @@ namespace mozilla {
class ErrorResult;
namespace dom {
namespace power {
class PowerManager MOZ_FINAL : public nsIDOMMozWakeLockListener
, public nsWrapperCache
@ -66,7 +65,6 @@ private:
nsTArray<nsCOMPtr<nsIDOMMozWakeLockListener> > mListeners;
};
} // namespace power
} // namespace dom
} // namespace mozilla

View File

@ -14,7 +14,6 @@
#include "nsIDOMWindow.h"
#include "nsIDOMEvent.h"
#include "nsPIDOMWindow.h"
#include "PowerManager.h"
DOMCI_DATA(MozWakeLock, mozilla::dom::power::WakeLock)

View File

@ -15,8 +15,11 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_power'
EXPORTS.mozilla.dom.power += [
EXPORTS.mozilla.dom += [
'PowerManager.h',
]
EXPORTS.mozilla.dom.power += [
'PowerManagerService.h',
'Types.h',
]