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

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

Issue 2272773002: Use intersection observer to control frame throttling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust OOPIF expectations Created 4 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: third_party/WebKit/Source/core/dom/IntersectionObserverController.h
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserverController.h b/third_party/WebKit/Source/core/dom/IntersectionObserverController.h
index f577121caafb3b5d44bcb186072a5fd5d7dc89ef..52fc2869eb067a3b9a6dfad850743a14525e0f5a 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserverController.h
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserverController.h
@@ -16,6 +16,7 @@
namespace blink {
+class CancellableTaskFactory;
class Document;
class IntersectionObserverController : public IdleRequestCallback, public ActiveDOMObject {
@@ -39,13 +40,19 @@ private:
explicit IntersectionObserverController(Document*);
private:
+ void deliverLowLatencyNotifications();
+
// IntersectionObservers for which this is the tracking document.
HeapHashSet<WeakMember<IntersectionObserver>> m_trackedIntersectionObservers;
// IntersectionObservers for which this is the execution context of the callback.
HeapHashSet<Member<IntersectionObserver>> m_pendingIntersectionObservers;
+ HeapHashSet<Member<IntersectionObserver>> m_pendingLowLatencyIntersectionObservers;
+
+ std::unique_ptr<CancellableTaskFactory> m_lowLatencyNotificationTask;
int m_callbackID;
bool m_callbackFiredWhileSuspended;
+ bool m_lowLatencyCallbackFiredWhileSuspended;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698