Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.h

Issue 2681863005: [Video] MediaSession API event handlers can resume background video. (Closed)
Patch Set: Tweaked the logic in HTMLME a bit Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.h b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
index 1b3a7d95135ecac2a6aae4dffedc9f3a5ecdfd55..01f7867524683963d062e12a846db0838e7cb0e7 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -393,11 +393,14 @@ class CORE_EXPORT HTMLMediaElement
void disconnectedFromRemoteDevice() final;
void cancelledRemotePlaybackRequest() final;
void remotePlaybackStarted() final;
+ void wasPausedWhenBackgrounded() final;
+ void wasResumedWhenForegrounded() final;
bool hasSelectedVideoTrack() final;
WebMediaPlayer::TrackId getSelectedVideoTrackId() final;
bool isAutoplayingMuted() final;
void requestReload(const WebURL&) final;
void activateViewportIntersectionMonitoring(bool) final;
+ bool isBackgroundVideoPlaybackUnlocked() final;
void loadTimerFired(TimerBase*);
void progressEventTimerFired(TimerBase*);
@@ -634,6 +637,7 @@ class CORE_EXPORT HTMLMediaElement
// FIXME: HTMLMediaElement has way too many state bits.
bool m_lockedPendingUserGesture : 1;
bool m_lockedPendingUserGestureIfCrossOriginExperimentEnabled : 1;
+ bool m_wasLockedWhenBackgrounded : 1;
bool m_playing : 1;
bool m_shouldDelayLoadEvent : 1;
bool m_haveFiredLoadedData : 1;

Powered by Google App Engine
This is Rietveld 408576698