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_MESSAGE_LOOP_H_ | 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
148 }; | 148 }; |
149 | 149 |
150 // Add a DestructionObserver, which will start receiving notifications | 150 // Add a DestructionObserver, which will start receiving notifications |
151 // immediately. | 151 // immediately. |
152 void AddDestructionObserver(DestructionObserver* destruction_observer); | 152 void AddDestructionObserver(DestructionObserver* destruction_observer); |
153 | 153 |
154 // Remove a DestructionObserver. It is safe to call this method while a | 154 // Remove a DestructionObserver. It is safe to call this method while a |
155 // DestructionObserver is receiving a notification callback. | 155 // DestructionObserver is receiving a notification callback. |
156 void RemoveDestructionObserver(DestructionObserver* destruction_observer); | 156 void RemoveDestructionObserver(DestructionObserver* destruction_observer); |
157 | 157 |
158 // NOTE: Deprecated; prefer task_runner() and the TaskRunner interfaces. | |
Wez
2015/03/20 04:13:01
Is there a cleanup bug filed to update call-sites
Sami
2015/03/20 17:16:56
I was going to do as part of the linked bug. I've
danakj
2015/03/20 17:19:12
Linking to bugs in TODO is a good practice.
| |
159 // | |
158 // The "PostTask" family of methods call the task's Run method asynchronously | 160 // The "PostTask" family of methods call the task's Run method asynchronously |
159 // from within a message loop at some point in the future. | 161 // from within a message loop at some point in the future. |
160 // | 162 // |
161 // With the PostTask variant, tasks are invoked in FIFO order, inter-mixed | 163 // With the PostTask variant, tasks are invoked in FIFO order, inter-mixed |
162 // with normal UI or IO event processing. With the PostDelayedTask variant, | 164 // with normal UI or IO event processing. With the PostDelayedTask variant, |
163 // tasks are called after at least approximately 'delay_ms' have elapsed. | 165 // tasks are called after at least approximately 'delay_ms' have elapsed. |
164 // | 166 // |
165 // The NonNestable variants work similarly except that they promise never to | 167 // The NonNestable variants work similarly except that they promise never to |
166 // dispatch the task from a nested invocation of MessageLoop::Run. Instead, | 168 // dispatch the task from a nested invocation of MessageLoop::Run. Instead, |
167 // such tasks get deferred until the top-most MessageLoop::Run is executing. | 169 // such tasks get deferred until the top-most MessageLoop::Run is executing. |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
649 | 651 |
650 // Do not add any member variables to MessageLoopForIO! This is important b/c | 652 // Do not add any member variables to MessageLoopForIO! This is important b/c |
651 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 653 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
652 // data that you need should be stored on the MessageLoop's pump_ instance. | 654 // data that you need should be stored on the MessageLoop's pump_ instance. |
653 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 655 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
654 MessageLoopForIO_should_not_have_extra_member_variables); | 656 MessageLoopForIO_should_not_have_extra_member_variables); |
655 | 657 |
656 } // namespace base | 658 } // namespace base |
657 | 659 |
658 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 660 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
OLD | NEW |