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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 std::string thread_name_; | 493 std::string thread_name_; |
494 // A profiling histogram showing the counts of various messages and events. | 494 // A profiling histogram showing the counts of various messages and events. |
495 HistogramBase* message_histogram_; | 495 HistogramBase* message_histogram_; |
496 | 496 |
497 RunLoop* run_loop_; | 497 RunLoop* run_loop_; |
498 | 498 |
499 ObserverList<TaskObserver> task_observers_; | 499 ObserverList<TaskObserver> task_observers_; |
500 | 500 |
501 debug::TaskAnnotator task_annotator_; | 501 debug::TaskAnnotator task_annotator_; |
502 | 502 |
| 503 // Used to allow creating a breadcrumb of program counters in PostTask. |
| 504 // Be very careful when using this variable. |
| 505 const PendingTask* current_pending_task_; |
| 506 |
503 scoped_refptr<internal::IncomingTaskQueue> incoming_task_queue_; | 507 scoped_refptr<internal::IncomingTaskQueue> incoming_task_queue_; |
504 | 508 |
505 // The message loop proxy associated with this message loop. | 509 // The message loop proxy associated with this message loop. |
506 scoped_refptr<internal::MessageLoopProxyImpl> message_loop_proxy_; | 510 scoped_refptr<internal::MessageLoopProxyImpl> message_loop_proxy_; |
507 scoped_ptr<ThreadTaskRunnerHandle> thread_task_runner_handle_; | 511 scoped_ptr<ThreadTaskRunnerHandle> thread_task_runner_handle_; |
508 | 512 |
509 template <class T, class R> friend class base::subtle::DeleteHelperInternal; | 513 template <class T, class R> friend class base::subtle::DeleteHelperInternal; |
510 template <class T, class R> friend class base::subtle::ReleaseHelperInternal; | 514 template <class T, class R> friend class base::subtle::ReleaseHelperInternal; |
511 | 515 |
512 void DeleteSoonInternal(const tracked_objects::Location& from_here, | 516 void DeleteSoonInternal(const tracked_objects::Location& from_here, |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 | 658 |
655 // Do not add any member variables to MessageLoopForIO! This is important b/c | 659 // Do not add any member variables to MessageLoopForIO! This is important b/c |
656 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 660 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
657 // data that you need should be stored on the MessageLoop's pump_ instance. | 661 // data that you need should be stored on the MessageLoop's pump_ instance. |
658 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 662 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
659 MessageLoopForIO_should_not_have_extra_member_variables); | 663 MessageLoopForIO_should_not_have_extra_member_variables); |
660 | 664 |
661 } // namespace base | 665 } // namespace base |
662 | 666 |
663 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 667 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
OLD | NEW |