| 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 |
| 11 #include "base/base_export.h" | 11 #include "base/base_export.h" |
| 12 #include "base/basictypes.h" | |
| 13 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 14 #include "base/debug/task_annotator.h" | 13 #include "base/debug/task_annotator.h" |
| 15 #include "base/location.h" | 14 #include "base/location.h" |
| 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/message_loop/incoming_task_queue.h" | 18 #include "base/message_loop/incoming_task_queue.h" |
| 19 #include "base/message_loop/message_loop_task_runner.h" | 19 #include "base/message_loop/message_loop_task_runner.h" |
| 20 #include "base/message_loop/message_pump.h" | 20 #include "base/message_loop/message_pump.h" |
| 21 #include "base/message_loop/timer_slack.h" | 21 #include "base/message_loop/timer_slack.h" |
| 22 #include "base/observer_list.h" | 22 #include "base/observer_list.h" |
| 23 #include "base/pending_task.h" | 23 #include "base/pending_task.h" |
| 24 #include "base/sequenced_task_runner_helpers.h" | 24 #include "base/sequenced_task_runner_helpers.h" |
| 25 #include "base/synchronization/lock.h" | 25 #include "base/synchronization/lock.h" |
| 26 #include "base/time/time.h" | 26 #include "base/time/time.h" |
| 27 #include "base/tracking_info.h" | 27 #include "base/tracking_info.h" |
| 28 #include "build/build_config.h" |
| 28 | 29 |
| 29 // TODO(sky): these includes should not be necessary. Nuke them. | 30 // TODO(sky): these includes should not be necessary. Nuke them. |
| 30 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
| 31 #include "base/message_loop/message_pump_win.h" | 32 #include "base/message_loop/message_pump_win.h" |
| 32 #elif defined(OS_IOS) | 33 #elif defined(OS_IOS) |
| 33 #include "base/message_loop/message_pump_io_ios.h" | 34 #include "base/message_loop/message_pump_io_ios.h" |
| 34 #elif defined(OS_POSIX) | 35 #elif defined(OS_POSIX) |
| 35 #include "base/message_loop/message_pump_libevent.h" | 36 #include "base/message_loop/message_pump_libevent.h" |
| 36 #endif | 37 #endif |
| 37 | 38 |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 | 682 |
| 682 // Do not add any member variables to MessageLoopForIO! This is important b/c | 683 // Do not add any member variables to MessageLoopForIO! This is important b/c |
| 683 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 684 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
| 684 // data that you need should be stored on the MessageLoop's pump_ instance. | 685 // data that you need should be stored on the MessageLoop's pump_ instance. |
| 685 static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 686 static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
| 686 "MessageLoopForIO should not have extra member variables"); | 687 "MessageLoopForIO should not have extra member variables"); |
| 687 | 688 |
| 688 } // namespace base | 689 } // namespace base |
| 689 | 690 |
| 690 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 691 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
| OLD | NEW |