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

Unified Diff: content/renderer/scheduler/renderer_scheduler.h

Issue 969373002: [content]: Add CanExceedIdleDeadlineIfRequired function to RendererScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@long_idle_5
Patch Set: Add trace event Created 5 years, 9 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: content/renderer/scheduler/renderer_scheduler.h
diff --git a/content/renderer/scheduler/renderer_scheduler.h b/content/renderer/scheduler/renderer_scheduler.h
index 7d2c39e3a86d5379382a8bf6929026343eee5bb4..7167f9585e614d87d4a6c360def3cedba1f8f766 100644
--- a/content/renderer/scheduler/renderer_scheduler.h
+++ b/content/renderer/scheduler/renderer_scheduler.h
@@ -70,6 +70,16 @@ class CONTENT_EXPORT RendererScheduler {
// Must be called from the main thread.
virtual bool ShouldYieldForHighPriorityWork() = 0;
+ // Returns true if a currently running idle task could exceed its deadline
+ // without impacting user experience too much. This should only be used if
+ // there is a task which cannot be pre-empted and is likely to take longer
+ // than the largest expected idle task deadline. It should NOT be polled to
+ // check whether more work can be performed on the current idle task after
+ // its deadline has expired - post a new idle task for the continuation of the
+ // work in this case.
+ // Must be called from the main thread.
+ virtual bool CanExceedIdleDeadlineIfRequired() const = 0;
+
// Adds or removes a task observer from the scheduler. The observer will be
// notified before and after every executed task. These functions can only be
// called on the main thread.
« no previous file with comments | « content/renderer/scheduler/null_renderer_scheduler.cc ('k') | content/renderer/scheduler/renderer_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698