Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 is expected. This temporarially | |
|
Sami
2015/09/24 14:15:04
nit: I don't think we need to specify here how thi
alex clarke (OOO till 29th)
2015/09/24 14:53:10
Done.
| |
| 88 // prevents blocking of expensive tasks. | |
| 89 virtual void navigationExpected() { } | |
|
Sami
2015/09/24 14:15:04
nit: should all of these be onNavigation[...] to m
alex clarke (OOO till 29th)
2015/09/24 14:53:10
Done.
| |
| 90 | |
| 91 // Tells the scheduler that an expected navigation was canceled. | |
| 92 virtual void navigationCanceled() { } | |
| 93 | |
| 87 #ifdef INSIDE_BLINK | 94 #ifdef INSIDE_BLINK |
| 88 // Helpers for posting bound functions as tasks. | 95 // Helpers for posting bound functions as tasks. |
| 89 typedef Function<void(double deadlineSeconds)> IdleTask; | 96 typedef Function<void(double deadlineSeconds)> IdleTask; |
| 90 | 97 |
| 91 void postIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); | 98 void postIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); |
| 92 void postNonNestableIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); | 99 void postNonNestableIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); |
| 93 void postIdleTaskAfterWakeup(const WebTraceLocation&, PassOwnPtr<IdleTask>); | 100 void postIdleTaskAfterWakeup(const WebTraceLocation&, PassOwnPtr<IdleTask>); |
| 94 #endif | 101 #endif |
| 95 }; | 102 }; |
| 96 | 103 |
| 97 } // namespace blink | 104 } // namespace blink |
| 98 | 105 |
| 99 #endif // WebScheduler_h | 106 #endif // WebScheduler_h |
| OLD | NEW |