summaryrefslogtreecommitdiffstats
path: root/hal/Hal.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-28 15:46:41 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-28 15:46:41 +0000
commitad453f0b28bf1ac30f889abf3ae38e95315295b0 (patch)
treec33683c6009278b1c6e9f049465fb2e4eda890d4 /hal/Hal.cpp
parentd332d4a60ddc0c82d72706ecb6084af6fed359cc (diff)
downloadUXP-ad453f0b28bf1ac30f889abf3ae38e95315295b0.tar
UXP-ad453f0b28bf1ac30f889abf3ae38e95315295b0.tar.gz
UXP-ad453f0b28bf1ac30f889abf3ae38e95315295b0.tar.lz
UXP-ad453f0b28bf1ac30f889abf3ae38e95315295b0.tar.xz
UXP-ad453f0b28bf1ac30f889abf3ae38e95315295b0.zip
Issue #1391 - Remove the DOM battery API
Diffstat (limited to 'hal/Hal.cpp')
-rw-r--r--hal/Hal.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/hal/Hal.cpp b/hal/Hal.cpp
index 67930c355..981f49125 100644
--- a/hal/Hal.cpp
+++ b/hal/Hal.cpp
@@ -264,30 +264,6 @@ private:
bool mHasValidCache;
};
-class BatteryObserversManager : public CachingObserversManager<BatteryInformation>
-{
-protected:
- void EnableNotifications() {
- PROXY_IF_SANDBOXED(EnableBatteryNotifications());
- }
-
- void DisableNotifications() {
- PROXY_IF_SANDBOXED(DisableBatteryNotifications());
- }
-
- void GetCurrentInformationInternal(BatteryInformation* aInfo) {
- PROXY_IF_SANDBOXED(GetCurrentBatteryInformation(aInfo));
- }
-};
-
-static BatteryObserversManager&
-BatteryObservers()
-{
- static BatteryObserversManager sBatteryObservers;
- AssertMainThread();
- return sBatteryObservers;
-}
-
class NetworkObserversManager : public CachingObserversManager<NetworkInformation>
{
protected:
@@ -356,35 +332,6 @@ ScreenConfigurationObservers()
return sScreenConfigurationObservers;
}
-void
-RegisterBatteryObserver(BatteryObserver* aObserver)
-{
- AssertMainThread();
- BatteryObservers().AddObserver(aObserver);
-}
-
-void
-UnregisterBatteryObserver(BatteryObserver* aObserver)
-{
- AssertMainThread();
- BatteryObservers().RemoveObserver(aObserver);
-}
-
-void
-GetCurrentBatteryInformation(BatteryInformation* aInfo)
-{
- AssertMainThread();
- *aInfo = BatteryObservers().GetCurrentInformation();
-}
-
-void
-NotifyBatteryChange(const BatteryInformation& aInfo)
-{
- AssertMainThread();
- BatteryObservers().CacheInformation(aInfo);
- BatteryObservers().BroadcastCachedInformation();
-}
-
bool GetScreenEnabled()
{
AssertMainThread();