Name Description Size Coverage
components.conf 659 -
metrics.yaml 1704 -
moz.build 843 -
nsIDOMWakeLockListener.idl The callback will be called when a lock topic changes its lock state. Possible states are: - "unlocked" - nobody holds the wake lock. - "locked-foreground" - at least one window holds the wake lock, and it is visible. - "locked-background" - at least one window holds the wake lock, but all of them are hidden. @param aTopic The resource name related to the wake lock. @param aState The wake lock state 910 -
nsIPowerManagerService.idl For use with non-content code. 1077 -
nsIWakeLock.idl 363 -
PowerManagerService.cpp static 3825 97 %
PowerManagerService.h 1617 100 %
tests -
WakeLock.cpp Null windows are allowed. A wake lock without associated window is always considered invisible. 4816 93 %
WakeLock.h 1776 75 %
WakeLockJS.cpp 8146 86 %
WakeLockJS.h Management class for wake locks held from client scripts. Instances of this class have two purposes: - Implement navigator.wakeLock.request which creates a WakeLockSentinel - Listen for state changes that require all WakeLockSentinel to be released The WakeLockSentinel objects are held in document.mActiveLocks. https://www.w3.org/TR/screen-wake-lock/#the-wakelock-interface 2610 50 %
WakeLockSentinel.cpp 3202 82 %
WakeLockSentinel.h To avoid user fingerprinting, WakeLockJS::Request will provide a WakeLockSentinel even if the lock type is not applicable or cannot be obtained. But when releasing this sentinel, we have to know whether AcquireActualLock was called. https://w3c.github.io/screen-wake-lock/#dfn-applicable-wake-lock https://w3c.github.io/screen-wake-lock/#the-request-method 2018 100 %