| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef BASE_MESSAGE_LOOP_H_ |
| 6 #define BASE_MESSAGE_LOOP_H_ | 6 #define BASE_MESSAGE_LOOP_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 | 498 |
| 499 base::RunLoop* run_loop_; | 499 base::RunLoop* run_loop_; |
| 500 | 500 |
| 501 #if defined(OS_WIN) | 501 #if defined(OS_WIN) |
| 502 base::TimeTicks high_resolution_timer_expiration_; | 502 base::TimeTicks high_resolution_timer_expiration_; |
| 503 // Should be set to true before calling Windows APIs like TrackPopupMenu, etc | 503 // Should be set to true before calling Windows APIs like TrackPopupMenu, etc |
| 504 // which enter a modal message loop. | 504 // which enter a modal message loop. |
| 505 bool os_modal_loop_; | 505 bool os_modal_loop_; |
| 506 #endif | 506 #endif |
| 507 | 507 |
| 508 // The next sequence number to use for delayed tasks. | 508 // The next sequence number to use for delayed tasks. Updating this counter is |
| 509 // protected by incoming_queue_lock_. |
| 509 int next_sequence_num_; | 510 int next_sequence_num_; |
| 510 | 511 |
| 511 ObserverList<TaskObserver> task_observers_; | 512 ObserverList<TaskObserver> task_observers_; |
| 512 | 513 |
| 513 // The message loop proxy associated with this message loop, if one exists. | 514 // The message loop proxy associated with this message loop, if one exists. |
| 514 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; | 515 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
| 515 scoped_ptr<base::ThreadTaskRunnerHandle> thread_task_runner_handle_; | 516 scoped_ptr<base::ThreadTaskRunnerHandle> thread_task_runner_handle_; |
| 516 | 517 |
| 517 private: | 518 private: |
| 518 template <class T, class R> friend class base::subtle::DeleteHelperInternal; | 519 template <class T, class R> friend class base::subtle::DeleteHelperInternal; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 #endif // defined(OS_POSIX) | 672 #endif // defined(OS_POSIX) |
| 672 }; | 673 }; |
| 673 | 674 |
| 674 // Do not add any member variables to MessageLoopForIO! This is important b/c | 675 // Do not add any member variables to MessageLoopForIO! This is important b/c |
| 675 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 676 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
| 676 // data that you need should be stored on the MessageLoop's pump_ instance. | 677 // data that you need should be stored on the MessageLoop's pump_ instance. |
| 677 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 678 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
| 678 MessageLoopForIO_should_not_have_extra_member_variables); | 679 MessageLoopForIO_should_not_have_extra_member_variables); |
| 679 | 680 |
| 680 #endif // BASE_MESSAGE_LOOP_H_ | 681 #endif // BASE_MESSAGE_LOOP_H_ |
| OLD | NEW |