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

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

Issue 2075563003: [Android, Media] Don't unlock MediaStream elements; instead allow MS to autoplay without a gesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 653bd31414424e201ea67841db7031fe26075257..9b94fee5c0c00a0777827929c2691abc2c22d260 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -462,6 +462,13 @@ private:
// m_helper and give it a reason.
void unlockUserGesture();
+ // Restores the user gesture requirement for the media element.
+ void lockUserGesture();
+
+ // Returns true if and only if the media element should require user
+ // gesture to unlock within the specified document.
+ bool needToLockPendingUserGesture(const Document&) const;
+
// Return true if and only if a user gesture is requried for playback. Even
// if isLockedPendingUserGesture() return true, this might return false if
// the requirement is currently overridden. This does not check if a user
@@ -587,6 +594,7 @@ private:
bool m_playingRemotely : 1;
// Whether this element is in overlay fullscreen mode.
bool m_inOverlayFullscreenVideo : 1;
+ bool m_unlockedUserGestureForMediaStream : 1;
foolip 2016/06/22 15:25:56 more state bits :)
Member<AudioTrackList> m_audioTracks;
Member<VideoTrackList> m_videoTracks;

Powered by Google App Engine
This is Rietveld 408576698