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

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

Issue 1329853004: Include viewport visibility checks for autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@autoplay_step1
Patch Set: Rebased onto merged blink repo. Created 5 years, 3 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
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 614c6ce029563ab390b6395af1f1e283eed2f81d..63ef61ca2a06a1e68c91240cb9bc8d7ff74d5038 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -3752,6 +3752,16 @@ void HTMLMediaElement::setInitialPlayWithoutUserGestures(bool value)
m_initialPlayWithoutUserGesture = value;
}
+void HTMLMediaElement::notifyPositionMayHaveChanged()
+{
+ m_autoplayHelper.positionChanged();
+}
+
+void HTMLMediaElement::triggerAutoplayViewportCheck()
+{
+ m_autoplayHelper.triggerAutoplayViewportCheck();
+}
+
#if ENABLE(WEB_AUDIO)
void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
{
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.h ('k') | third_party/WebKit/Source/core/layout/LayoutMedia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698