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

Side by Side Diff: third_party/WebKit/public/platform/WebScheduler.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, 2 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/loader/NavigationScheduler.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebScheduler_h 5 #ifndef WebScheduler_h
6 #define WebScheduler_h 6 #define WebScheduler_h
7 7
8 #include "WebCommon.h" 8 #include "WebCommon.h"
9 #include "public/platform/WebTaskRunner.h" 9 #include "public/platform/WebTaskRunner.h"
10 #include "public/platform/WebThread.h" 10 #include "public/platform/WebThread.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 virtual WebFrameHostScheduler* createFrameHostScheduler() { return nullptr; } 77 virtual WebFrameHostScheduler* createFrameHostScheduler() { return nullptr; }
78 78
79 // Suspends the timer queue and increments the timer queue suspension count. 79 // Suspends the timer queue and increments the timer queue suspension count.
80 // May only be called from the main thread. 80 // May only be called from the main thread.
81 virtual void suspendTimerQueue() { } 81 virtual void suspendTimerQueue() { }
82 82
83 // Decrements the timer queue suspension count and re-enables the timer queu e 83 // Decrements the timer queue suspension count and re-enables the timer queu e
84 // if the suspension count is zero and the current scheduler policy allows i t. 84 // if the suspension count is zero and the current scheduler policy allows i t.
85 virtual void resumeTimerQueue() { } 85 virtual void resumeTimerQueue() { }
86 86
87 // Tells the scheduler that a navigation task is pending.
88 // TODO(alexclarke): Long term should this be a task trait?
89 virtual void addPendingNavigation() { }
90
91 // Tells the scheduler that a navigation task is no longer pending.
92 virtual void removePendingNavigation() { }
93
94 // Tells the scheduler that an expected navigation was started.
95 virtual void onNavigationStarted() { }
96
87 #ifdef INSIDE_BLINK 97 #ifdef INSIDE_BLINK
88 // Helpers for posting bound functions as tasks. 98 // Helpers for posting bound functions as tasks.
89 typedef Function<void(double deadlineSeconds)> IdleTask; 99 typedef Function<void(double deadlineSeconds)> IdleTask;
90 100
91 void postIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); 101 void postIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>);
92 void postNonNestableIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); 102 void postNonNestableIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>);
93 void postIdleTaskAfterWakeup(const WebTraceLocation&, PassOwnPtr<IdleTask>); 103 void postIdleTaskAfterWakeup(const WebTraceLocation&, PassOwnPtr<IdleTask>);
94 #endif 104 #endif
95 }; 105 };
96 106
97 } // namespace blink 107 } // namespace blink
98 108
99 #endif // WebScheduler_h 109 #endif // WebScheduler_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/NavigationScheduler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698