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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.h

Issue 1370723002: Include viewport visibility checks for autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: identical to PS4 on 1329853004 (probably rebased) 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/layout/LayoutView.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.h b/third_party/WebKit/Source/core/layout/LayoutView.h
index 6772b76e061f5d27b95485512cea58f1c990a9c9..01f4d270743096952fa90c9b05969191074a2a0f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.h
+++ b/third_party/WebKit/Source/core/layout/LayoutView.h
@@ -40,6 +40,7 @@ namespace blink {
class DeprecatedPaintLayerCompositor;
class LayoutQuote;
+class LayoutMedia;
// LayoutView is the root of the layout tree and the Document's LayoutObject.
//
@@ -198,6 +199,15 @@ public:
// It is very likely you do not want to call this method.
void setShouldDoFullPaintInvalidationForViewAndAllDescendants();
+ // Some LayoutMedias want to know about their viewport visibility for
+ // crbug.com/487345,402044 . This facility will be removed once those
+ // experiments complete.
+ void registerMediaForPositionChangeNotification(LayoutMedia*);
ojan 2015/10/01 06:14:26 Please add: TODO(ojan): Merge this with Intersecti
liberato (no reviews please) 2015/10/01 22:49:03 Done.
+ void unregisterMediaForPositionChangeNotification(LayoutMedia*);
+ // Notify all registered LayoutMedias that their position on-screen might
+ // have changed.
+ void sendMediaPositionChangeNotifications();
+
private:
void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const override;
@@ -260,6 +270,8 @@ private:
unsigned m_hitTestCount;
unsigned m_hitTestCacheHits;
OwnPtrWillBePersistent<HitTestCache> m_hitTestCache;
+
+ Vector<LayoutMedia*> m_mediaForPositionNotification;
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView());

Powered by Google App Engine
This is Rietveld 408576698