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

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

Issue 2524443002: Adding Rappor metrics for disabling cross-origin autoplay with sound experiment (Closed)
Patch Set: rebased Created 4 years 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 540c9271134c84ac0359ee3f709e8c55e934a562..d4860f37298872d27141403d9d7da577c8a881db 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -293,6 +293,9 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
// specified origin.
bool isMediaDataCORSSameOrigin(SecurityOrigin*) const;
+ // Returns this media element is in a cross-origin frame.
+ bool isInCrossOriginFrame() const;
+
void scheduleEvent(Event*);
void scheduleTimeupdateEvent(bool periodicEvent);
@@ -510,6 +513,8 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
// should use, if checking to see if an action is allowed.
bool isLockedPendingUserGesture() const;
+ bool isLockedPendingUserGestureIfCrossOriginExperimentEnabled() const;
+
// If the user gesture is required, then this will remove it. Note that
// one should not generally call this method directly; use the one on
// m_helper and give it a reason.
@@ -521,6 +526,10 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
// gesture is currently being processed.
bool isGestureNeededForPlayback() const;
+ bool isGestureNeededForPlaybackIfCrossOriginExperimentEnabled() const;
+
+ bool isGestureNeededForPlaybackIfPendingUserGestureIsLocked() const;
+
// Return true if and only if the settings allow autoplay of media on this
// frame.
bool isAutoplayAllowedPerSettings() const;
@@ -626,6 +635,7 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
// FIXME: HTMLMediaElement has way too many state bits.
bool m_lockedPendingUserGesture : 1;
+ bool m_lockedPendingUserGestureIfCrossOriginExperimentEnabled : 1;
bool m_playing : 1;
bool m_shouldDelayLoadEvent : 1;
bool m_haveFiredLoadedData : 1;
« no previous file with comments | « third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp ('k') | third_party/WebKit/Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698