| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 bool in_high_res_mode_; | 398 bool in_high_res_mode_; |
| 399 #endif | 399 #endif |
| 400 | 400 |
| 401 // Contains delayed tasks, sorted by their 'delayed_run_time' property. | 401 // Contains delayed tasks, sorted by their 'delayed_run_time' property. |
| 402 DelayedTaskQueue delayed_work_queue_; | 402 DelayedTaskQueue delayed_work_queue_; |
| 403 | 403 |
| 404 // A recent snapshot of Time::Now(), used to check delayed_work_queue_. | 404 // A recent snapshot of Time::Now(), used to check delayed_work_queue_. |
| 405 TimeTicks recent_time_; | 405 TimeTicks recent_time_; |
| 406 | 406 |
| 407 // A queue of non-nestable tasks that we had to defer because when it came | 407 // A queue of non-nestable tasks that we had to defer because when it came |
| 408 // time to execute them we were in a nested message loop. They will execute | 408 // time to execute them we were in a nested run loop. They will execute |
| 409 // once we're out of nested message loops. | 409 // once we're out of nested run loops. |
| 410 TaskQueue deferred_non_nestable_work_queue_; | 410 TaskQueue deferred_non_nestable_work_queue_; |
| 411 | 411 |
| 412 ObserverList<DestructionObserver> destruction_observers_; | 412 ObserverList<DestructionObserver> destruction_observers_; |
| 413 | 413 |
| 414 // A recursion block that prevents accidentally running additional tasks when | 414 // A recursion block that prevents accidentally running additional tasks when |
| 415 // insider a (accidentally induced?) nested message pump. | 415 // insider a (accidentally induced?) nested message pump. |
| 416 bool nestable_tasks_allowed_; | 416 bool nestable_tasks_allowed_; |
| 417 | 417 |
| 418 // pump_factory_.Run() is called to create a message pump for this loop | 418 // pump_factory_.Run() is called to create a message pump for this loop |
| 419 // if type_ is TYPE_CUSTOM and pump_ is null. | 419 // if type_ is TYPE_CUSTOM and pump_ is null. |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 | 591 |
| 592 // Do not add any member variables to MessageLoopForIO! This is important b/c | 592 // Do not add any member variables to MessageLoopForIO! This is important b/c |
| 593 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 593 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
| 594 // data that you need should be stored on the MessageLoop's pump_ instance. | 594 // data that you need should be stored on the MessageLoop's pump_ instance. |
| 595 static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 595 static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
| 596 "MessageLoopForIO should not have extra member variables"); | 596 "MessageLoopForIO should not have extra member variables"); |
| 597 | 597 |
| 598 } // namespace base | 598 } // namespace base |
| 599 | 599 |
| 600 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 600 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
| OLD | NEW |