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

Unified Diff: third_party/WebKit/Source/core/dom/IntersectionObserver.h

Issue 2051253002: Start autoplay muted videos with autoplay attribute when they are visible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup and tests Created 4 years, 6 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/dom/IntersectionObserver.h
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.h b/third_party/WebKit/Source/core/dom/IntersectionObserver.h
index ecf68c3c88f1a9575bc22476d4c0671976b3b6c8..56376480da1beb056dee1e453ee9aeeb6d77f27c 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.h
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.h
@@ -28,17 +28,23 @@ public:
static IntersectionObserver* create(const IntersectionObserverInit&, IntersectionObserverCallback&, ExceptionState&);
static void resumeSuspendedObservers();
- // API methods
+ IntersectionObserver(IntersectionObserverCallback&, Node&, const Vector<Length>& rootMargin, const Vector<float>& thresholds);
+
+ // JS API methods.
void observe(Element*, ExceptionState&);
esprehn 2016/06/14 16:01:18 void observe(Element*, ExceptionState& = ASSERT_NO
void unobserve(Element*, ExceptionState&);
void disconnect(ExceptionState&);
HeapVector<Member<IntersectionObserverEntry>> takeRecords(ExceptionState&);
- // API attributes
+ // JS API attributes.
Element* root() const;
String rootMargin() const;
const Vector<float>& thresholds() const { return m_thresholds; }
+ // C++ API methods.
+ void observe(Element*);
+ void unobserve(Element*);
esprehn 2016/06/14 16:01:18 remove
+
Node* rootNode() const { return m_root.get(); }
LayoutObject* rootLayoutObject() const;
const Length& topMargin() const { return m_topMargin; }
@@ -57,7 +63,6 @@ public:
DECLARE_TRACE();
private:
- explicit IntersectionObserver(IntersectionObserverCallback&, Node&, const Vector<Length>& rootMargin, const Vector<float>& thresholds);
void clearWeakMembers(Visitor*);
Member<IntersectionObserverCallback> m_callback;

Powered by Google App Engine
This is Rietveld 408576698