| 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 <memory> | 8 #include <memory> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 bool HasHighResolutionTasks(); | 307 bool HasHighResolutionTasks(); |
| 308 | 308 |
| 309 // Returns true if the message loop is "idle". Provided for testing. | 309 // Returns true if the message loop is "idle". Provided for testing. |
| 310 bool IsIdleForTesting(); | 310 bool IsIdleForTesting(); |
| 311 | 311 |
| 312 // Returns the TaskAnnotator which is used to add debug information to posted | 312 // Returns the TaskAnnotator which is used to add debug information to posted |
| 313 // tasks. | 313 // tasks. |
| 314 debug::TaskAnnotator* task_annotator() { return &task_annotator_; } | 314 debug::TaskAnnotator* task_annotator() { return &task_annotator_; } |
| 315 | 315 |
| 316 // Runs the specified PendingTask. | 316 // Runs the specified PendingTask. |
| 317 void RunTask(const PendingTask& pending_task); | 317 void RunTask(PendingTask* pending_task); |
| 318 | 318 |
| 319 #if defined(OS_WIN) | 319 #if defined(OS_WIN) |
| 320 // TODO (stanisc): crbug.com/596190: Remove this after the signaling issue | 320 // TODO (stanisc): crbug.com/596190: Remove this after the signaling issue |
| 321 // has been investigated. | 321 // has been investigated. |
| 322 // This should be used for diagnostic only. If message pump wake-up mechanism | 322 // This should be used for diagnostic only. If message pump wake-up mechanism |
| 323 // is based on auto-reset event this call would reset the event to unset | 323 // is based on auto-reset event this call would reset the event to unset |
| 324 // state. | 324 // state. |
| 325 bool MessagePumpWasSignaled(); | 325 bool MessagePumpWasSignaled(); |
| 326 #endif | 326 #endif |
| 327 | 327 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 | 600 |
| 601 // Do not add any member variables to MessageLoopForIO! This is important b/c | 601 // Do not add any member variables to MessageLoopForIO! This is important b/c |
| 602 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 602 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
| 603 // data that you need should be stored on the MessageLoop's pump_ instance. | 603 // data that you need should be stored on the MessageLoop's pump_ instance. |
| 604 static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 604 static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
| 605 "MessageLoopForIO should not have extra member variables"); | 605 "MessageLoopForIO should not have extra member variables"); |
| 606 | 606 |
| 607 } // namespace base | 607 } // namespace base |
| 608 | 608 |
| 609 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 609 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
| OLD | NEW |