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

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

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.h
diff --git a/Source/core/layout/LayoutView.h b/Source/core/layout/LayoutView.h
index ea2d26fb1293418ec90d06deeb704c0e50177288..a7f029a82a58f880fd02ffb3cd84efa2b3a10112 100644
--- a/Source/core/layout/LayoutView.h
+++ b/Source/core/layout/LayoutView.h
@@ -42,6 +42,7 @@ namespace blink {
class DeprecatedPaintLayerCompositor;
class LayoutQuote;
+class LayoutMedia;
// The root of the layout tree, corresponding to the CSS initial containing block.
// It's dimensions match that of the logical viewport (which may be different from
@@ -189,6 +190,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*);
+ 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;
@@ -234,6 +244,8 @@ private:
OwnPtrWillBePersistent<HitTestCache> m_hitTestCache;
OwnPtrWillBePersistent<PendingSelection> m_pendingSelection;
+
+ Vector<LayoutMedia*> m_mediaForPositionNotification;
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView());

Powered by Google App Engine
This is Rietveld 408576698