OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 ObserverList<DestructionObserver> destruction_observers_; | 390 ObserverList<DestructionObserver> destruction_observers_; |
391 | 391 |
392 // A recursion block that prevents accidentally running additonal tasks when | 392 // A recursion block that prevents accidentally running additonal tasks when |
393 // insider a (accidentally induced?) nested message pump. | 393 // insider a (accidentally induced?) nested message pump. |
394 bool nestable_tasks_allowed_; | 394 bool nestable_tasks_allowed_; |
395 | 395 |
396 bool exception_restoration_; | 396 bool exception_restoration_; |
397 | 397 |
398 std::string thread_name_; | 398 std::string thread_name_; |
399 // A profiling histogram showing the counts of various messages and events. | 399 // A profiling histogram showing the counts of various messages and events. |
400 scoped_ptr<LinearHistogram> message_histogram_; | 400 scoped_refptr<Histogram> message_histogram_; |
401 | 401 |
402 // A null terminated list which creates an incoming_queue of tasks that are | 402 // A null terminated list which creates an incoming_queue of tasks that are |
403 // aquired under a mutex for processing on this instance's thread. These tasks | 403 // aquired under a mutex for processing on this instance's thread. These tasks |
404 // have not yet been sorted out into items for our work_queue_ vs items that | 404 // have not yet been sorted out into items for our work_queue_ vs items that |
405 // will be handled by the TimerManager. | 405 // will be handled by the TimerManager. |
406 TaskQueue incoming_queue_; | 406 TaskQueue incoming_queue_; |
407 // Protect access to incoming_queue_. | 407 // Protect access to incoming_queue_. |
408 Lock incoming_queue_lock_; | 408 Lock incoming_queue_lock_; |
409 | 409 |
410 RunState* state_; | 410 RunState* state_; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 #endif // defined(OS_POSIX) | 514 #endif // defined(OS_POSIX) |
515 }; | 515 }; |
516 | 516 |
517 // Do not add any member variables to MessageLoopForIO! This is important b/c | 517 // Do not add any member variables to MessageLoopForIO! This is important b/c |
518 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 518 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
519 // data that you need should be stored on the MessageLoop's pump_ instance. | 519 // data that you need should be stored on the MessageLoop's pump_ instance. |
520 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 520 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
521 MessageLoopForIO_should_not_have_extra_member_variables); | 521 MessageLoopForIO_should_not_have_extra_member_variables); |
522 | 522 |
523 #endif // BASE_MESSAGE_LOOP_H_ | 523 #endif // BASE_MESSAGE_LOOP_H_ |
OLD | NEW |