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/WebThread.h" | 9 #include "public/platform/WebThread.h" |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 virtual void postLoadingTask(const WebTraceLocation&, WebThread::Task*) { } | 63 virtual void postLoadingTask(const WebTraceLocation&, WebThread::Task*) { } |
| 64 | 64 |
| 65 // Schedule a timer task to be run on the the associated WebThread. Timer Ta sks | 65 // Schedule a timer task to be run on the the associated WebThread. Timer Ta sks |
| 66 // tasks usually have the default priority, but may be delayed | 66 // tasks usually have the default priority, but may be delayed |
| 67 // when the user is interacting with the device. | 67 // when the user is interacting with the device. |
| 68 // Takes ownership of |WebThread::Task|. Can be called from any thread. | 68 // Takes ownership of |WebThread::Task|. Can be called from any thread. |
| 69 virtual void postTimerTask(const WebTraceLocation&, WebThread::Task*, long l ong delayMs) { } | 69 virtual void postTimerTask(const WebTraceLocation&, WebThread::Task*, long l ong delayMs) { } |
| 70 | 70 |
| 71 #ifdef INSIDE_BLINK | 71 #ifdef INSIDE_BLINK |
| 72 // Helpers for posting bound functions as tasks. | 72 // Helpers for posting bound functions as tasks. |
| 73 typedef Function<void(double deadlineSeconds)> IdleTask; | 73 typedef WTF::Function<void(double deadlineSeconds)> IdleTask; |
| 74 typedef Function<void()> Task; | 74 typedef WTF::Function<void()> Task; |
|
kinuko
2015/05/13 08:26:39
nit: is this change related to this CL?
Sami
2015/05/13 18:01:26
Ah, we don't actually need to do this I think. Rem
| |
| 75 | 75 |
| 76 void postIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); | 76 void postIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); |
| 77 void postNonNestableIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); | 77 void postNonNestableIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); |
| 78 void postIdleTaskAfterWakeup(const WebTraceLocation&, PassOwnPtr<IdleTask>); | 78 void postIdleTaskAfterWakeup(const WebTraceLocation&, PassOwnPtr<IdleTask>); |
| 79 void postLoadingTask(const WebTraceLocation&, PassOwnPtr<Task>); | 79 void postLoadingTask(const WebTraceLocation&, PassOwnPtr<Task>); |
| 80 #endif | 80 #endif |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace blink | 83 } // namespace blink |
| 84 | 84 |
| 85 #endif // WebScheduler_h | 85 #endif // WebScheduler_h |
| OLD | NEW |