Bug 1482753 - Move power/Types.h into hal/ and WakeLockObserver into hal namespace. r=gsvelto

Differential Revision: https://phabricator.services.mozilla.com/D3181

--HG--
rename : dom/power/Types.h => hal/HalWakeLockInformation.h
This commit is contained in:
Hiroyuki Ikezoe 2018-08-13 10:57:50 +09:00
Родитель 330f831cb7
Коммит 2e21aec705
5 изменённых файлов: 12 добавлений и 16 удалений

Просмотреть файл

@ -12,8 +12,7 @@
#include "nsTArray.h"
#include "nsIDOMWakeLockListener.h"
#include "nsIPowerManagerService.h"
#include "mozilla/Observer.h"
#include "Types.h"
#include "mozilla/HalWakeLockInformation.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/dom/WakeLock.h"
@ -26,7 +25,7 @@ namespace power {
class PowerManagerService
: public nsIPowerManagerService
, public WakeLockObserver
, public hal::WakeLockObserver
{
public:
NS_DECL_ISUPPORTS

Просмотреть файл

@ -20,7 +20,6 @@ EXPORTS.mozilla.dom += [
EXPORTS.mozilla.dom.power += [
'PowerManagerService.h',
'Types.h',
]
UNIFIED_SOURCES += [

Просмотреть файл

@ -10,12 +10,12 @@
#include "base/basictypes.h"
#include "base/platform_thread.h"
#include "nsTArray.h"
#include "mozilla/dom/power/Types.h"
#include "mozilla/dom/ScreenOrientation.h"
#include "mozilla/hal_sandbox/PHal.h"
#include "mozilla/HalBatteryInformation.h"
#include "mozilla/HalNetworkInformation.h"
#include "mozilla/HalScreenConfiguration.h"
#include "mozilla/HalWakeLockInformation.h"
#include "mozilla/HalTypes.h"
#include "mozilla/Types.h"
@ -184,13 +184,13 @@ void DisableWakeLockNotifications();
* Inform the wake lock backend there is a new wake lock observer.
* @param aWakeLockObserver The observer that should be added.
*/
void RegisterWakeLockObserver(WakeLockObserver* aObserver);
void RegisterWakeLockObserver(hal::WakeLockObserver* aObserver);
/**
* Inform the wake lock backend a wake lock observer unregistered.
* @param aWakeLockObserver The observer that should be removed.
*/
void UnregisterWakeLockObserver(WakeLockObserver* aObserver);
void UnregisterWakeLockObserver(hal::WakeLockObserver* aObserver);
/**
* Adjust a wake lock's counts on behalf of a given process.

Просмотреть файл

@ -3,20 +3,17 @@
/* 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_power_Types_h
#define mozilla_dom_power_Types_h
#ifndef mozilla_HalWakeLockInformation_h
#define mozilla_HalWakeLockInformation_h
#include "mozilla/Observer.h"
namespace mozilla {
namespace hal {
class WakeLockInformation;
} // namespace hal
template <class T>
class Observer;
typedef Observer<hal::WakeLockInformation> WakeLockObserver;
} // namespace hal
} // namespace mozilla
#endif // mozilla_dom_power_Types_h
#endif // mozilla_HalWakeLockInformation_h

Просмотреть файл

@ -17,6 +17,7 @@ EXPORTS.mozilla += [
'HalSensor.h',
'HalTypes.h',
'HalWakeLock.h',
'HalWakeLockInformation.h',
]
EXPORTS.mozilla.fallback += [