Index: components/scheduler/renderer/renderer_scheduler.h |
diff --git a/components/scheduler/renderer/renderer_scheduler.h b/components/scheduler/renderer/renderer_scheduler.h |
index d605e52ce620fc7aa0f120249dd1c72a0379dd5d..3ec03e0b23a94a009bdbc1de057ad5cc80633b2b 100644 |
--- a/components/scheduler/renderer/renderer_scheduler.h |
+++ b/components/scheduler/renderer/renderer_scheduler.h |
@@ -106,10 +106,20 @@ 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 is expected. The scheduler will |
+ // ensure that loading tasks are not blocked even if they are expensive. |
+ // This mode lasts until either OnNavigationStarted or OnNavigationCanceled is |
+ // called. |
+ virtual void OnNavigationExpected() = 0; |
+ |
+ // Tells the scheduler that an expected navigation was canceled. The |
+ // scheduler may now block expensive tasks. |
+ virtual void OnNavigationCanceled() = 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 |