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

Unified Diff: third_party/WebKit/Source/core/frame/DOMTimerCoordinator.h

Issue 1340343003: scheduler: Implement WebFrameScheduler and WebPageScheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased + fixed gn build. Created 5 years, 3 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/frame/DOMTimerCoordinator.h
diff --git a/third_party/WebKit/Source/core/frame/DOMTimerCoordinator.h b/third_party/WebKit/Source/core/frame/DOMTimerCoordinator.h
index b32a49ed3ae09c476384688bfe7341bc2c6b9c9c..f429bc32369efbf370641ccdc216fbec650cee50 100644
--- a/third_party/WebKit/Source/core/frame/DOMTimerCoordinator.h
+++ b/third_party/WebKit/Source/core/frame/DOMTimerCoordinator.h
@@ -14,6 +14,7 @@ namespace blink {
class DOMTimer;
class ExecutionContext;
class ScheduledAction;
+class WebTaskRunner;
// Maintains a set of DOMTimers for a given page or
// worker. DOMTimerCoordinator assigns IDs to timers; these IDs are
@@ -24,7 +25,7 @@ class DOMTimerCoordinator {
DISALLOW_ALLOCATION();
WTF_MAKE_NONCOPYABLE(DOMTimerCoordinator);
public:
- DOMTimerCoordinator();
+ explicit DOMTimerCoordinator(WebTaskRunner*);
// Creates and installs a new timer. Returns the assigned ID.
int installNewTimeout(ExecutionContext*, PassOwnPtrWillBeRawPtr<ScheduledAction>, int timeout, bool singleShot);
@@ -49,6 +50,10 @@ public:
// deeper timer nesting level, see DOMTimer::DOMTimer.
void setTimerNestingLevel(int level) { m_timerNestingLevel = level; }
+ void setTimerTaskRunner(WebTaskRunner* timerTaskRunner) { m_timerTaskRunner = timerTaskRunner; }
+
+ WebTaskRunner* timerTaskRunner() const { return m_timerTaskRunner; }
+
DECLARE_TRACE(); // Oilpan.
private:
@@ -59,6 +64,7 @@ private:
int m_circularSequentialID;
int m_timerNestingLevel;
+ WebTaskRunner* m_timerTaskRunner; // NOT OWNED
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMTimer.cpp ('k') | third_party/WebKit/Source/core/frame/DOMTimerCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698