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/WebThread.h" | 9 #include "public/platform/WebThread.h" |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // task has run. This enables posting of a task which won't stop the Blink | 50 // task has run. This enables posting of a task which won't stop the Blink |
51 // main thread from sleeping, but will start running after it wakes up. | 51 // main thread from sleeping, but will start running after it wakes up. |
52 // Takes ownership of |IdleTask|. Can be called from any thread. | 52 // Takes ownership of |IdleTask|. Can be called from any thread. |
53 virtual void postIdleTaskAfterWakeup(const WebTraceLocation&, WebThread::Idl
eTask*) { } | 53 virtual void postIdleTaskAfterWakeup(const WebTraceLocation&, WebThread::Idl
eTask*) { } |
54 | 54 |
55 // Schedule a loading task to be run on the Blink main thread. Loading | 55 // Schedule a loading task to be run on the Blink main thread. Loading |
56 // tasks usually have the default priority, but may be deprioritised | 56 // tasks usually have the default priority, but may be deprioritised |
57 // when the user is interacting with the device. | 57 // when the user is interacting with the device. |
58 // Takes ownership of |WebThread::Task|. Can be called from any thread. | 58 // Takes ownership of |WebThread::Task|. Can be called from any thread. |
59 virtual void postLoadingTask(const WebTraceLocation&, WebThread::Task*) { } | 59 virtual void postLoadingTask(const WebTraceLocation&, WebThread::Task*) { } |
| 60 |
| 61 // Schedule a timer task to be run on the Blink main thread. Timer Tasks |
| 62 // tasks usually have the default priority, but may be delayed |
| 63 // when the user is interacting with the device. |
| 64 // Takes ownership of |WebThread::Task|. Can be called from any thread. |
| 65 virtual void postTimerTask(const WebTraceLocation&, WebThread::Task*, long l
ong delayMs) { } |
60 }; | 66 }; |
61 | 67 |
62 } // namespace blink | 68 } // namespace blink |
63 | 69 |
64 #endif // WebScheduler_h | 70 #endif // WebScheduler_h |
OLD | NEW |