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

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

Issue 847883002: Reland "Throttle resource message requests during user interaction" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pull out ThreadChecker fix Created 5 years, 10 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 f8a206081ad753cb016a492f65bd10c85d15865e..e1b5c578d244b2e3f2569f13369d3cc740e0c06b 100644
--- a/content/renderer/scheduler/renderer_scheduler.h
+++ b/content/renderer/scheduler/renderer_scheduler.h
@@ -53,8 +53,16 @@ class CONTENT_EXPORT RendererScheduler {
// a fling). Called by the compositor (impl) thread.
virtual void DidAnimateForInputOnCompositorThread() = 0;
+ // Returns true if the scheduler has reason to believe that high priority work
+ // may soon arrive on the main thread, e.g., if gesture events were observed
+ // recently.
+ // Must be called from the main thread.
+ virtual bool IsHighPriorityWorkAnticipated() = 0;
+
// Returns true if there is high priority work pending on the main thread
- // and the caller should yield to let the scheduler service that work.
+ // and the caller should yield to let the scheduler service that work. Note
+ // that this is a stricter condition than |IsHighPriorityWorkAnticipated|,
+ // restricted to the case where real work is pending.
// Must be called from the main thread.
virtual bool ShouldYieldForHighPriorityWork() = 0;
« 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