| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/base_export.h" | 12 #include "base/base_export.h" |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
| 15 #include "base/location.h" | 15 #include "base/location.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/message_loop_helpers.h" | 17 #include "base/message_loop_helpers.h" |
| 18 #include "base/message_loop_proxy.h" | 18 #include "base/message_loop_proxy.h" |
| 19 #include "base/message_pump.h" | 19 #include "base/message_pump.h" |
| 20 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
| 21 #include "base/pending_task.h" | 21 #include "base/pending_task.h" |
| 22 #include "base/synchronization/lock.h" | 22 #include "base/synchronization/lock.h" |
| 23 #include "base/task.h" | |
| 24 #include "base/tracking_info.h" | 23 #include "base/tracking_info.h" |
| 25 #include "base/time.h" | 24 #include "base/time.h" |
| 26 | 25 |
| 27 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
| 28 // We need this to declare base::MessagePumpWin::Dispatcher, which we should | 27 // We need this to declare base::MessagePumpWin::Dispatcher, which we should |
| 29 // really just eliminate. | 28 // really just eliminate. |
| 30 #include "base/message_pump_win.h" | 29 #include "base/message_pump_win.h" |
| 31 #elif defined(OS_POSIX) | 30 #elif defined(OS_POSIX) |
| 32 #include "base/message_pump_libevent.h" | 31 #include "base/message_pump_libevent.h" |
| 33 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) | 32 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 #endif // defined(OS_POSIX) | 659 #endif // defined(OS_POSIX) |
| 661 }; | 660 }; |
| 662 | 661 |
| 663 // Do not add any member variables to MessageLoopForIO! This is important b/c | 662 // Do not add any member variables to MessageLoopForIO! This is important b/c |
| 664 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 663 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
| 665 // data that you need should be stored on the MessageLoop's pump_ instance. | 664 // data that you need should be stored on the MessageLoop's pump_ instance. |
| 666 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 665 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
| 667 MessageLoopForIO_should_not_have_extra_member_variables); | 666 MessageLoopForIO_should_not_have_extra_member_variables); |
| 668 | 667 |
| 669 #endif // BASE_MESSAGE_LOOP_H_ | 668 #endif // BASE_MESSAGE_LOOP_H_ |
| OLD | NEW |