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

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

Issue 1938443002: Allow muted third-party autoplay with -ormuted experiment option. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed unused flag. Created 4 years, 7 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 | third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h
diff --git a/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h b/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h
index b7e1acbbe91c9ceb6532a57ba74d93728a2357ca..b6be02cd1e49254fe576cfaf976a8179eb0065cf 100644
--- a/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h
+++ b/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.h
@@ -113,6 +113,7 @@ public:
virtual bool muted() const = 0;
virtual void setMuted(bool) = 0;
virtual void playInternal() = 0;
+ virtual void pauseInternal() = 0;
virtual bool isLockedPendingUserGesture() const = 0;
virtual void unlockUserGesture() = 0;
virtual void recordAutoplayMetric(AutoplayMetrics) = 0;
@@ -147,6 +148,7 @@ public:
void playMethodCalled();
void pauseMethodCalled();
void loadMethodCalled();
+ void mutedChanged();
void positionChanged(const IntRect&);
void updatePositionNotificationRegistration();
void recordSandboxFailure();
@@ -205,9 +207,13 @@ public:
// Restrict gestureless autoplay to sites which are from the same origin
// as the top-level frame.
IfSameOrigin = 1 << 7,
+ // Extend IfSameOrigin to allow autoplay of cross-origin elements if
+ // they're muted. This has no effect on same-origin or if IfSameOrigin
+ // isn't enabled.
+ OrMuted = 1 << 8,
// If gestureless autoplay is allowed, then mute the media before
// starting to play.
- PlayMuted = 1 << 8,
+ PlayMuted = 1 << 9,
};
DEFINE_INLINE_TRACE() { visitor->trace(m_client); }
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698