mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 01:40:50 +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
|
|
@ -13,7 +13,6 @@
|
|||
#include "mozilla/hal_sandbox/PHalParent.h"
|
||||
#include "mozilla/dom/TabParent.h"
|
||||
#include "mozilla/dom/TabChild.h"
|
||||
#include "mozilla/dom/battery/Types.h"
|
||||
#include "mozilla/dom/network/Types.h"
|
||||
#include "mozilla/dom/ScreenOrientation.h"
|
||||
#include "mozilla/EnumeratedRange.h"
|
||||
|
|
@ -69,24 +68,6 @@ CancelVibrate(const WindowIdentifier &id)
|
|||
Hal()->SendCancelVibrate(newID.AsArray(), TabChild::GetFrom(newID.GetWindow()));
|
||||
}
|
||||
|
||||
void
|
||||
EnableBatteryNotifications()
|
||||
{
|
||||
Hal()->SendEnableBatteryNotifications();
|
||||
}
|
||||
|
||||
void
|
||||
DisableBatteryNotifications()
|
||||
{
|
||||
Hal()->SendDisableBatteryNotifications();
|
||||
}
|
||||
|
||||
void
|
||||
GetCurrentBatteryInformation(BatteryInformation* aBatteryInfo)
|
||||
{
|
||||
Hal()->SendGetCurrentBatteryInformation(aBatteryInfo);
|
||||
}
|
||||
|
||||
void
|
||||
EnableNetworkNotifications()
|
||||
{
|
||||
|
|
@ -376,7 +357,6 @@ bool SystemServiceIsRunning(const char* aSvcName)
|
|||
}
|
||||
|
||||
class HalParent : public PHalParent
|
||||
, public BatteryObserver
|
||||
, public NetworkObserver
|
||||
, public ISensorObserver
|
||||
, public WakeLockObserver
|
||||
|
|
@ -390,7 +370,6 @@ public:
|
|||
{
|
||||
// NB: you *must* unconditionally unregister your observer here,
|
||||
// if it *may* be registered below.
|
||||
hal::UnregisterBatteryObserver(this);
|
||||
hal::UnregisterNetworkObserver(this);
|
||||
hal::UnregisterScreenConfigurationObserver(this);
|
||||
for (auto sensor : MakeEnumeratedRange(NUM_SENSOR_TYPE)) {
|
||||
|
|
@ -431,30 +410,6 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
virtual bool
|
||||
RecvEnableBatteryNotifications() override {
|
||||
// We give all content battery-status permission.
|
||||
hal::RegisterBatteryObserver(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool
|
||||
RecvDisableBatteryNotifications() override {
|
||||
hal::UnregisterBatteryObserver(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool
|
||||
RecvGetCurrentBatteryInformation(BatteryInformation* aBatteryInfo) override {
|
||||
// We give all content battery-status permission.
|
||||
hal::GetCurrentBatteryInformation(aBatteryInfo);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Notify(const BatteryInformation& aBatteryInfo) override {
|
||||
Unused << SendNotifyBatteryChange(aBatteryInfo);
|
||||
}
|
||||
|
||||
virtual bool
|
||||
RecvEnableNetworkNotifications() override {
|
||||
// We give all content access to this network-status information.
|
||||
|
|
@ -768,12 +723,6 @@ public:
|
|||
sHalChildDestroyed = true;
|
||||
}
|
||||
|
||||
virtual bool
|
||||
RecvNotifyBatteryChange(const BatteryInformation& aBatteryInfo) override {
|
||||
hal::NotifyBatteryChange(aBatteryInfo);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool
|
||||
RecvNotifySensorChange(const hal::SensorData &aSensorData) override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue