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

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

Issue 191273002: Revert "Remove the HTMLVideoElement-specific prefixed fullscreen API" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/core/frame/UseCounter.cpp ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.h
diff --git a/Source/core/html/HTMLMediaElement.h b/Source/core/html/HTMLMediaElement.h
index 5a1ab2d7f1c2e118bde314d677a5b9d70b2b57a7..264e781efe12c98cf3f5067f7768a4c713f9aa9f 100644
--- a/Source/core/html/HTMLMediaElement.h
+++ b/Source/core/html/HTMLMediaElement.h
@@ -235,6 +235,7 @@ public:
bool isFullscreen() const;
virtual void enterFullscreen() OVERRIDE FINAL;
+ void exitFullscreen();
virtual bool hasClosedCaptions() const OVERRIDE FINAL;
virtual bool closedCaptionsVisible() const OVERRIDE FINAL;
@@ -285,6 +286,20 @@ protected:
void setControllerInternal(PassRefPtr<MediaController>);
+ // Restrictions to change default behaviors.
+ enum BehaviorRestrictionFlags {
+ NoRestrictions = 0,
+ RequireUserGestureForPlayRestriction = 1 << 0,
+ RequireUserGestureForFullscreenRestriction = 1 << 1,
+ };
+ typedef unsigned BehaviorRestrictions;
+
+ bool userGestureRequiredForPlay() const { return m_restrictions & RequireUserGestureForPlayRestriction; }
+ bool userGestureRequiredForFullscreen() const { return m_restrictions & RequireUserGestureForFullscreenRestriction; }
+
+ void addBehaviorRestriction(BehaviorRestrictions restriction) { m_restrictions |= restriction; }
+ void removeBehaviorRestriction(BehaviorRestrictions restriction) { m_restrictions &= ~restriction; }
+
bool ignoreTrackDisplayUpdateRequests() const { return m_ignoreTrackDisplayUpdate > 0; }
void beginIgnoringTrackDisplayUpdateRequests();
void endIgnoringTrackDisplayUpdateRequests();
@@ -406,6 +421,8 @@ private:
void changeNetworkStateFromLoadingToIdle();
+ void removeBehaviorsRestrictionsAfterFirstUserGesture();
+
const AtomicString& mediaGroup() const;
void setMediaGroup(const AtomicString&);
void updateMediaController();
@@ -452,6 +469,8 @@ private:
blink::WebLayer* m_webLayer;
bool m_opaque;
+ BehaviorRestrictions m_restrictions;
+
MediaPlayer::Preload m_preload;
DisplayMode m_displayMode;
@@ -469,7 +488,6 @@ private:
PendingActionFlags m_pendingActionFlags;
// FIXME: MediaElement has way too many state bits.
- bool m_userGestureRequiredForPlay : 1;
bool m_playing : 1;
bool m_shouldDelayLoadEvent : 1;
bool m_haveFiredLoadedData : 1;
« no previous file with comments | « Source/core/frame/UseCounter.cpp ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698