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

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

Issue 1368643002: Add a signal to the scheduler that a navigation is expected (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename for Sami 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
« no previous file with comments | « no previous file | components/scheduler/renderer/renderer_scheduler_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/renderer/renderer_scheduler.h
diff --git a/components/scheduler/renderer/renderer_scheduler.h b/components/scheduler/renderer/renderer_scheduler.h
index 76755e84eee06b1de95318bfd8a37e35accf4388..f183b0707e731901c8323bd397a970e591aa6462 100644
--- a/components/scheduler/renderer/renderer_scheduler.h
+++ b/components/scheduler/renderer/renderer_scheduler.h
@@ -114,10 +114,19 @@ class SCHEDULER_EXPORT RendererScheduler : public ChildScheduler {
// Must be called on the main thread.
virtual void OnRendererForegrounded() = 0;
- // Tells the scheduler that a page load has started. The scheduler will
+ // Tells the scheduler that a navigation task is pending. While any navigation
+ // tasks are pending, the scheduler will ensure that loading tasks are not
+ // blocked even if they are expensive. Must be called on the main thread.
+ virtual void AddPendingNavigation() = 0;
+
+ // Tells the scheduler that a navigation task is no longer pending.
+ // Must be called on the main thread.
+ virtual void RemovePendingNavigation() = 0;
+
+ // Tells the scheduler that a navigation has started. The scheduler will
// prioritize loading tasks for a short duration afterwards.
// Must be called from the main thread.
- virtual void OnPageLoadStarted() = 0;
+ virtual void OnNavigationStarted() = 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
« no previous file with comments | « no previous file | components/scheduler/renderer/renderer_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698