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

Unified Diff: Source/core/layout/LayoutView.cpp

Issue 1179223002: Implement autoplay gesture override experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: linker errors on win/mac... Created 5 years, 4 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: Source/core/layout/LayoutView.cpp
diff --git a/Source/core/layout/LayoutView.cpp b/Source/core/layout/LayoutView.cpp
index 6d382e74a7b20b63b47724a53c4b8287df0b300c..27caf97a450bafb08ee0e4ef2ed2380efea99cef 100644
--- a/Source/core/layout/LayoutView.cpp
+++ b/Source/core/layout/LayoutView.cpp
@@ -28,10 +28,12 @@
#include "core/frame/Settings.h"
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/html/HTMLIFrameElement.h"
+#include "core/html/HTMLVideoElement.h"
#include "core/inspector/InspectorTraceEvents.h"
#include "core/layout/HitTestResult.h"
#include "core/layout/LayoutFlowThread.h"
#include "core/layout/LayoutGeometryMap.h"
+#include "core/layout/LayoutMedia.h"
#include "core/layout/LayoutPart.h"
#include "core/layout/LayoutQuote.h"
#include "core/layout/LayoutScrollbarPart.h"
@@ -1012,4 +1014,27 @@ void LayoutView::willBeDestroyed()
m_compositor.clear();
}
+void LayoutView::registerMediaForPositionChangeNotification(LayoutMedia* media)
+{
+ if (!m_mediaForPositionNotification.contains(media))
+ m_mediaForPositionNotification.append(media);
+}
+
+void LayoutView::unregisterMediaForPositionChangeNotification(LayoutMedia* media)
+{
+ size_t at = m_mediaForPositionNotification.find(media);
+ if (at != kNotFound)
+ m_mediaForPositionNotification.remove(at);
+}
+
+void LayoutView::sendMediaPositionChangeNotifications()
+{
+ for (LayoutMedia** media = m_mediaForPositionNotification.begin();
ojan 2015/09/01 20:20:11 C++11 auto to make this for loop more readable. Se
liberato (no reviews please) 2015/09/04 06:49:46 Done.
+ media != m_mediaForPositionNotification.end(); media++) {
+ if (!(*media))
+ continue;
+ (*media)->notifyPositionMayHaveChanged();
+ }
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698