mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Issue #1391 - Remove the DOM battery API
This commit is contained in:
parent
d97bcfb97a
commit
b33e80b186
30 changed files with 0 additions and 1833 deletions
53
hal/Hal.cpp
53
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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue