| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_ | 5 #ifndef BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_ |
| 6 #define BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_ | 6 #define BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_ |
| 7 | 7 |
| 8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/pending_task.h" | 10 #include "base/pending_task.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // on this instance's thread. These tasks have not yet been been pushed to | 77 // on this instance's thread. These tasks have not yet been been pushed to |
| 78 // |message_loop_|. | 78 // |message_loop_|. |
| 79 TaskQueue incoming_queue_; | 79 TaskQueue incoming_queue_; |
| 80 | 80 |
| 81 // Points to the message loop that owns |this|. | 81 // Points to the message loop that owns |this|. |
| 82 MessageLoop* message_loop_; | 82 MessageLoop* message_loop_; |
| 83 | 83 |
| 84 // The next sequence number to use for delayed tasks. | 84 // The next sequence number to use for delayed tasks. |
| 85 int next_sequence_num_; | 85 int next_sequence_num_; |
| 86 | 86 |
| 87 // True if our message loop has already been scheduled and does not need to be |
| 88 // scheduled again until an empty reload occurs. |
| 89 bool message_loop_scheduled_; |
| 90 |
| 91 // True if we always need to call ScheduleWork when receiving a new task, even |
| 92 // if the incoming queue was not empty. |
| 93 const bool always_schedule_work_; |
| 94 |
| 87 DISALLOW_COPY_AND_ASSIGN(IncomingTaskQueue); | 95 DISALLOW_COPY_AND_ASSIGN(IncomingTaskQueue); |
| 88 }; | 96 }; |
| 89 | 97 |
| 90 } // namespace internal | 98 } // namespace internal |
| 91 } // namespace base | 99 } // namespace base |
| 92 | 100 |
| 93 #endif // BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_ | 101 #endif // BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_ |
| OLD | NEW |