Index: components/scheduler/child/child_scheduler.h |
diff --git a/components/scheduler/child/child_scheduler.h b/components/scheduler/child/child_scheduler.h |
index 8fd5359e8cfc38647aa567031a51f34384dcc526..45b22411346df850fe639879e915924dc2b4791e 100644 |
--- a/components/scheduler/child/child_scheduler.h |
+++ b/components/scheduler/child/child_scheduler.h |
@@ -27,6 +27,10 @@ class SCHEDULER_EXPORT ChildScheduler { |
// time if no idle time is available. |
virtual scoped_refptr<SingleThreadIdleTaskRunner> IdleTaskRunner() = 0; |
+ // Returns the shutdown task runner. Intended for tasks that must be able to |
+ // run, even after PreShutdown() is called. |
+ virtual scoped_refptr<base::SingleThreadTaskRunner> ShutdownTaskRunner() = 0; |
+ |
// Returns true if there is high priority work pending on the main thread |
// and the caller should yield to let the scheduler service that work. Note |
// that this is a stricter condition than |IsHighPriorityWorkAnticipated|, |
@@ -52,6 +56,11 @@ class SCHEDULER_EXPORT ChildScheduler { |
virtual void RemoveTaskObserver( |
base::MessageLoop::TaskObserver* task_observer) = 0; |
+ // Optional. This stops all queues except for shutdown and control queues. |
+ // Also ends any idle periods. If posted from a different thread, it blocks |
Sami
2015/04/23 13:14:02
Do we need to mention idle periods here? If we dis
alex clarke (OOO till 29th)
2015/04/23 17:34:32
I guess not.
|
+ // until the thread this class was created on has completed the pre-shutdown. |
+ virtual void PreShutdown() = 0; |
+ |
// Shuts down the scheduler by dropping any remaining pending work in the work |
// queues. After this call any work posted to the task runners will be |
// silently dropped. |