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

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

Issue 1477353002: Revert of Move throttling of background timers into the renderer scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/frame/DOMTimer.h
diff --git a/third_party/WebKit/Source/core/frame/DOMTimer.h b/third_party/WebKit/Source/core/frame/DOMTimer.h
index 59236c8a6ca91ca215726f03c1b2f7e1982a316f..4912ace9388b782e69082d29a668fe9568fa2d4a 100644
--- a/third_party/WebKit/Source/core/frame/DOMTimer.h
+++ b/third_party/WebKit/Source/core/frame/DOMTimer.h
@@ -52,6 +52,10 @@
// ActiveDOMObject
void stop() override;
+ // The following are essentially constants. All intervals are in seconds.
+ static double hiddenPageAlignmentInterval();
+ static double visiblePageAlignmentInterval();
+
// Eager finalization is needed to promptly stop this Timer object.
// Otherwise timer events might fire at an object that's slated for destruction
// (when lazily swept), but some of its members (m_action) may already have
@@ -72,6 +76,9 @@
DOMTimer(ExecutionContext*, PassOwnPtrWillBeRawPtr<ScheduledAction>, int interval, bool singleShot, int timeoutID);
void fired() override;
+ // Retuns timer fire time rounded to the next multiple of timer alignment interval.
+ double alignedFireTime(double) const override;
+
WebTaskRunner* timerTaskRunner() override;
int m_timeoutID;
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp ('k') | third_party/WebKit/Source/core/frame/DOMTimer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698