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

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

Issue 2475643004: Monitor the intersection of video and viewport. (Closed)
Patch Set: Moved the calculation of intersection ratio to RemotingController. Created 4 years, 1 month 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 3281fcea96352ef256fc00bd74383250e40b02ac..3890c4fd80a340021e33d3c32eea8d8ec8064789 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.h
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.h
@@ -50,6 +50,11 @@ class CORE_EXPORT IntersectionObserver final
Document*,
std::unique_ptr<EventCallback>,
ExceptionState& = ASSERT_NO_EXCEPTION);
+ // Observes any element/viewport ratio changes.
+ static IntersectionObserver* create(const Vector<Length>& rootMargin,
+ Document*,
+ std::unique_ptr<EventCallback>,
+ ExceptionState& = ASSERT_NO_EXCEPTION);
static void resumeSuspendedObservers();
// API methods.
@@ -93,7 +98,8 @@ class CORE_EXPORT IntersectionObserver final
explicit IntersectionObserver(IntersectionObserverCallback&,
Node&,
const Vector<Length>& rootMargin,
- const Vector<float>& thresholds);
+ const Vector<float>& thresholds,
+ bool isObservingIntersection);
miu 2016/11/16 02:40:26 naming: This is weird because the class name is In
xjz 2016/11/16 07:45:55 Done.
void clearWeakMembers(Visitor*);
Member<IntersectionObserverCallback> m_callback;
@@ -106,6 +112,7 @@ class CORE_EXPORT IntersectionObserver final
Length m_bottomMargin;
Length m_leftMargin;
InitialState m_initialState;
+ bool m_observeViewportIntersection;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698