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

Unified Diff: Source/core/dom/Document.h

Issue 1119683003: Implement requestIdleCallback API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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/dom/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index ee489891be8a61edfec1ee620e8b022306080c69..487ba69a9883c1165fc6696e38a2e4e24c0376e3 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -119,6 +119,7 @@ class HTMLImportsController;
class HTMLLinkElement;
class HTMLScriptElement;
class HitTestRequest;
+class IdleRequestCallback;
class LayoutPoint;
class LiveNodeListBase;
class Locale;
@@ -142,6 +143,7 @@ class SVGUseElement;
class ScriptRunner;
class ScriptableDocumentParser;
class ScriptedAnimationController;
+class ScriptedIdleTaskController;
class SecurityOrigin;
class SegmentedString;
class SelectorQueryCache;
@@ -956,6 +958,9 @@ public:
void cancelAnimationFrame(int id);
void serviceScriptedAnimations(double monotonicAnimationStartTime);
+ int requestIdleFrame(IdleRequestCallback*);
+ void cancelIdleFrame(int id);
+
virtual EventTarget* errorEventTarget() override final;
virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack>) override final;
@@ -1092,6 +1097,7 @@ private:
bool isElementNode() const = delete; // This will catch anyone doing an unnecessary check.
ScriptedAnimationController& ensureScriptedAnimationController();
+ ScriptedIdleTaskController& ensureScriptedIdleTaskController();
virtual SecurityContext& securityContext() override final { return *this; }
virtual EventQueue* eventQueue() const override final;
@@ -1371,6 +1377,7 @@ private:
unsigned m_writeRecursionDepth;
RefPtrWillBeMember<ScriptedAnimationController> m_scriptedAnimationController;
+ RefPtrWillBeMember<ScriptedIdleTaskController> m_scriptedIdleTaskController;
OwnPtr<MainThreadTaskRunner> m_taskRunner;
OwnPtrWillBeMember<TextAutosizer> m_textAutosizer;

Powered by Google App Engine
This is Rietveld 408576698