Index: public/platform/WebScheduler.h |
diff --git a/public/platform/WebScheduler.h b/public/platform/WebScheduler.h |
index 463d1300af735ada6a105b97c63716c5c66145e6..0110aeed885230e13c7098363f46b4ae58709f56 100644 |
--- a/public/platform/WebScheduler.h |
+++ b/public/platform/WebScheduler.h |
@@ -64,10 +64,18 @@ public: |
// Takes ownership of |WebThread::Task|. Can be called from any thread. |
virtual void postTimerTask(const WebTraceLocation&, WebThread::Task*, long long delayMs) { } |
+ // Schedule a shutdown task to be run on the the associated WebThread. Shutdown |
+ // tasks can run at any time, including after preShutdown has been called. |
+ // Takes ownership of |WebThread::Task|. Can be called from any thread. |
+ virtual void postShutdownTask(const WebTraceLocation&, WebThread::Task*, long long delayMs) { } |
+ |
+ // Prevents execution of all tasks posted vis this interface, except shutdown tasks. |
+ virtual void preShutdown() { } |
+ |
#ifdef INSIDE_BLINK |
// Helpers for posting bound functions as tasks. |
- typedef Function<void(double deadlineSeconds)> IdleTask; |
- typedef Function<void()> Task; |
+ typedef WTF::Function<void(double deadlineSeconds)> IdleTask; |
+ typedef WTF::Function<void()> Task; |
void postIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); |
void postNonNestableIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); |