Chromium Code Reviews| Index: base/message_loop/incoming_task_queue.h |
| diff --git a/base/message_loop/incoming_task_queue.h b/base/message_loop/incoming_task_queue.h |
| index 72e1f30282966de72b01a505a6144839a1d00643..2a4502214ef4dfb774e32a57c09bf001d640e7d4 100644 |
| --- a/base/message_loop/incoming_task_queue.h |
| +++ b/base/message_loop/incoming_task_queue.h |
| @@ -53,6 +53,9 @@ class BASE_EXPORT IncomingTaskQueue |
| // Disconnects |this| from the parent message loop. |
| void WillDestroyCurrentMessageLoop(); |
| + // This should be called when it's ready for scheduling work. |
|
Nico
2015/04/27 22:49:34
s/it/the message loop/
kinuko
2015/04/28 15:43:25
Done.
|
| + void StartScheduling(); |
| + |
| private: |
| friend class RefCountedThreadSafe<IncomingTaskQueue>; |
| virtual ~IncomingTaskQueue(); |
| @@ -66,6 +69,9 @@ class BASE_EXPORT IncomingTaskQueue |
| // does not retain |pending_task->task| beyond this function call. |
| bool PostPendingTask(PendingTask* pending_task); |
| + // Wakes up the message loop and schedules work. |
| + void ScheduleWork(); |
| + |
| // Number of tasks that require high resolution timing. This value is kept |
| // so that ReloadWorkQueue() completes in constant time. |
| int high_res_task_count_; |
| @@ -92,6 +98,9 @@ class BASE_EXPORT IncomingTaskQueue |
| // if the incoming queue was not empty. |
| const bool always_schedule_work_; |
| + // False until StartScheduling() is called. |
| + bool is_ready_for_scheduling_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(IncomingTaskQueue); |
| }; |