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

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

Issue 177123006: Reduce HTMLMediaElement BehaviorRestrictions to a single state bit (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « no previous file | 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 4f17e1eb00dd18419b047734271fd9e4f525e725..5970c6061965970a38b694c5bac7d0505d3e6c39 100644
--- a/Source/core/html/HTMLMediaElement.h
+++ b/Source/core/html/HTMLMediaElement.h
@@ -298,18 +298,6 @@ protected:
void setControllerInternal(PassRefPtr<MediaController>);
- // Restrictions to change default behaviors.
- enum BehaviorRestrictionFlags {
- NoRestrictions = 0,
- RequireUserGestureForPlayRestriction = 1 << 0,
- };
- typedef unsigned BehaviorRestrictions;
-
- bool userGestureRequiredForPlay() const { return m_restrictions & RequireUserGestureForPlayRestriction; }
-
- 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();
@@ -436,8 +424,6 @@ private:
void changeNetworkStateFromLoadingToIdle();
- void removeBehaviorsRestrictionsAfterFirstUserGesture();
-
const AtomicString& mediaGroup() const;
void setMediaGroup(const AtomicString&);
void updateMediaController();
@@ -497,8 +483,6 @@ private:
blink::WebLayer* m_webLayer;
bool m_opaque;
- BehaviorRestrictions m_restrictions;
-
MediaPlayer::Preload m_preload;
DisplayMode m_displayMode;
@@ -516,6 +500,7 @@ 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 | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698