bool SetAlarm(int32_t aSeconds, int32_t aNanoseconds) { // It's pointless to program an alarm nothing is going to observe ... MOZ_ASSERT(sAlarmObserver); RETURN_PROXY_IF_SANDBOXED(SetAlarm(aSeconds, aNanoseconds), false); }
bool GetCpuSleepAllowed() { // Generally for interfaces that are accessible by normal web content // we should cache the result and be notified on state changes, like // what the battery API does. But since this is only used by // privileged interface, the synchronous getter is OK here. AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetCpuSleepAllowed()); }
bool RegisterTheOneAlarmObserver(AlarmObserver* aObserver) { MOZ_ASSERT(!InSandbox()); MOZ_ASSERT(!sAlarmObserver); sAlarmObserver = aObserver; RETURN_PROXY_IF_SANDBOXED(EnableAlarm(), false); }
bool GetLight(LightType light, hal::LightConfiguration* aConfig) { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetLight(light, aConfig)); }
bool SetLight(LightType light, const hal::LightConfiguration& aConfig) { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(SetLight(light, aConfig)); }
double GetScreenBrightness() { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetScreenBrightness()); }
bool GetScreenEnabled() { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetScreenEnabled()); }
uint32_t GetFMRadioSignalStrength() { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetFMRadioSignalStrength(), 0); }
bool IsHeadphoneEventFromInputDev() { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(IsHeadphoneEventFromInputDev(), false); }
uint32_t GetFMRadioFrequency() { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetFMRadioFrequency(), 0); }
SwitchState GetCurrentSwitchState(SwitchDevice aDevice) { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetCurrentSwitchState(aDevice), SWITCH_STATE_UNKNOWN); }
nsCString GetTimezone() { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetTimezone(), nsCString("")); }
int32_t GetTimezoneOffset() { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetTimezoneOffset(), 0); }
bool GetKeyLightEnabled() { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetKeyLightEnabled(), false); }
bool LockScreenOrientation(const dom::ScreenOrientation& aOrientation) { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(LockScreenOrientation(aOrientation)); }
bool IsFMRadioOn() { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(IsFMRadioOn(), false); }
hal::SwitchState GetCurrentSwitchState(hal::SwitchDevice aDevice) { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(GetCurrentSwitchState(aDevice)); }
bool EnableRDS(uint32_t aMask) { AssertMainThread(); RETURN_PROXY_IF_SANDBOXED(EnableRDS(aMask), false); }