diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-28 15:46:41 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-28 15:47:07 +0000 |
commit | 08fb2f306856948ecc71974dd98c0a6d78df25aa (patch) | |
tree | dd008594a9e130c8f2f916de398915cd7e54ad90 /hal/Hal.cpp | |
parent | 15ed0691f6fe6e558c7e733af9fca0586c4d554b (diff) | |
download | UXP-08fb2f306856948ecc71974dd98c0a6d78df25aa.tar UXP-08fb2f306856948ecc71974dd98c0a6d78df25aa.tar.gz UXP-08fb2f306856948ecc71974dd98c0a6d78df25aa.tar.lz UXP-08fb2f306856948ecc71974dd98c0a6d78df25aa.tar.xz UXP-08fb2f306856948ecc71974dd98c0a6d78df25aa.zip |
Issue #1391 - Remove the DOM battery API
Diffstat (limited to 'hal/Hal.cpp')
-rw-r--r-- | hal/Hal.cpp | 53 |
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(); |