mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +00:00
Bug 975955 - Hold a cpu wakelock while playing video. r=roc
This commit is contained in:
parent
7fa709fe4d
commit
ba0e91c17e
@ -114,7 +114,7 @@ protected:
|
||||
|
||||
virtual void WakeLockCreate();
|
||||
virtual void WakeLockRelease();
|
||||
void WakeLockUpdate();
|
||||
void UpdateScreenWakeLock();
|
||||
|
||||
nsRefPtr<WakeLock> mScreenWakeLock;
|
||||
|
||||
|
@ -244,7 +244,7 @@ void
|
||||
HTMLVideoElement::NotifyOwnerDocumentActivityChanged()
|
||||
{
|
||||
HTMLMediaElement::NotifyOwnerDocumentActivityChanged();
|
||||
WakeLockUpdate();
|
||||
UpdateScreenWakeLock();
|
||||
}
|
||||
|
||||
already_AddRefed<VideoPlaybackQuality>
|
||||
@ -281,17 +281,19 @@ HTMLVideoElement::GetVideoPlaybackQuality()
|
||||
void
|
||||
HTMLVideoElement::WakeLockCreate()
|
||||
{
|
||||
WakeLockUpdate();
|
||||
HTMLMediaElement::WakeLockCreate();
|
||||
UpdateScreenWakeLock();
|
||||
}
|
||||
|
||||
void
|
||||
HTMLVideoElement::WakeLockRelease()
|
||||
{
|
||||
WakeLockUpdate();
|
||||
UpdateScreenWakeLock();
|
||||
HTMLMediaElement::WakeLockRelease();
|
||||
}
|
||||
|
||||
void
|
||||
HTMLVideoElement::WakeLockUpdate()
|
||||
HTMLVideoElement::UpdateScreenWakeLock()
|
||||
{
|
||||
bool hidden = OwnerDoc()->Hidden();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user