| 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;
|
|
|