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

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

Issue 1370723002: Include viewport visibility checks for autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased. Created 5 years, 1 month 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 67c4db6ac6ae10aaacbedb6ff106c748d22ca1d6..177ef5ccb50fdafb7c4fec3e1371c02564940e63 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -3593,6 +3593,22 @@ void HTMLMediaElement::setNetworkState(NetworkState state)
}
}
+void HTMLMediaElement::notifyPositionMayHaveChanged(const IntRect& visibleRect)
+{
+ m_autoplayHelper.positionChanged(visibleRect);
+}
+
+void HTMLMediaElement::updatePositionNotificationRegistration()
+{
+ m_autoplayHelper.updatePositionNotificationRegistration();
+}
+
+// TODO(liberato): remove once autoplay gesture override experiment concludes.
+void HTMLMediaElement::triggerAutoplayViewportCheckForTesting()
+{
+ m_autoplayHelper.triggerAutoplayViewportCheckForTesting();
+}
+
#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