| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 ObserverList<DestructionObserver> destruction_observers_; | 466 ObserverList<DestructionObserver> destruction_observers_; |
| 467 | 467 |
| 468 // A recursion block that prevents accidentally running additonal tasks when | 468 // A recursion block that prevents accidentally running additonal tasks when |
| 469 // insider a (accidentally induced?) nested message pump. | 469 // insider a (accidentally induced?) nested message pump. |
| 470 bool nestable_tasks_allowed_; | 470 bool nestable_tasks_allowed_; |
| 471 | 471 |
| 472 bool exception_restoration_; | 472 bool exception_restoration_; |
| 473 | 473 |
| 474 std::string thread_name_; | 474 std::string thread_name_; |
| 475 // A profiling histogram showing the counts of various messages and events. | 475 // A profiling histogram showing the counts of various messages and events. |
| 476 scoped_refptr<base::Histogram> message_histogram_; | 476 base::Histogram* message_histogram_; |
| 477 | 477 |
| 478 // A null terminated list which creates an incoming_queue of tasks that are | 478 // A null terminated list which creates an incoming_queue of tasks that are |
| 479 // acquired under a mutex for processing on this instance's thread. These | 479 // acquired under a mutex for processing on this instance's thread. These |
| 480 // tasks have not yet been sorted out into items for our work_queue_ vs | 480 // tasks have not yet been sorted out into items for our work_queue_ vs |
| 481 // items that will be handled by the TimerManager. | 481 // items that will be handled by the TimerManager. |
| 482 TaskQueue incoming_queue_; | 482 TaskQueue incoming_queue_; |
| 483 // Protect access to incoming_queue_. | 483 // Protect access to incoming_queue_. |
| 484 mutable base::Lock incoming_queue_lock_; | 484 mutable base::Lock incoming_queue_lock_; |
| 485 | 485 |
| 486 RunState* state_; | 486 RunState* state_; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 #endif // defined(OS_POSIX) | 628 #endif // defined(OS_POSIX) |
| 629 }; | 629 }; |
| 630 | 630 |
| 631 // Do not add any member variables to MessageLoopForIO! This is important b/c | 631 // Do not add any member variables to MessageLoopForIO! This is important b/c |
| 632 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 632 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
| 633 // data that you need should be stored on the MessageLoop's pump_ instance. | 633 // data that you need should be stored on the MessageLoop's pump_ instance. |
| 634 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 634 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
| 635 MessageLoopForIO_should_not_have_extra_member_variables); | 635 MessageLoopForIO_should_not_have_extra_member_variables); |
| 636 | 636 |
| 637 #endif // BASE_MESSAGE_LOOP_H_ | 637 #endif // BASE_MESSAGE_LOOP_H_ |
| OLD | NEW |