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

Unified Diff: Source/core/layout/LayoutMedia.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/LayoutMedia.h
diff --git a/Source/core/layout/LayoutMedia.h b/Source/core/layout/LayoutMedia.h
index 0b77b5dac25fc30e0c86971b83deff5d72310564..c11adf21c5b32260dab73c821af0102f66dabe9e 100644
--- a/Source/core/layout/LayoutMedia.h
+++ b/Source/core/layout/LayoutMedia.h
@@ -51,7 +51,21 @@ public:
const char* name() const override { return "LayoutMedia"; }
+ // Temporary callback for crbug.com/587345,402044
+ void notifyPositionMayHaveChanged();
+
+ // Change whether we want or don't want to receive position change
+ // notifications. This will cause us to start / stop receiving change
+ // notifications if possible.
+ // Temporary method for crbug.com/587345,402044
+ void setRequestPositionUpdates(bool);
+
protected:
+ // Temporary overrides for crbug.com/587345,402044
+ void willBeDestroyed() override;
+ void insertedIntoTree() override;
+ void willBeRemovedFromTree() override;
+
void layout() override;
bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectMedia || LayoutImage::isOfType(type); }
@@ -70,7 +84,17 @@ private:
bool backgroundShouldAlwaysBeClipped() const final { return false; }
+ // Register or unregister us for position change notifications, to match
+ // the argument. Takes no action if not attached to a LayoutView or
+ // if we are already (un)registered correctly.
+ // Temporary helper for crbug.com/587345,402044
+ void updatePositionChangeRegistration(bool);
+
LayoutObjectChildList m_children;
+
+ // Temporary state for crbug.com/587345,402044
+ bool m_registeredForPositionChangeNotifications;
+ bool m_wantPositionChangeNotifications;
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMedia, isMedia());

Powered by Google App Engine
This is Rietveld 408576698