| 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> |
| 11 | 11 |
| 12 #include "base/base_api.h" | 12 #include "base/base_api.h" |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/message_pump.h" | 16 #include "base/message_pump.h" |
| 17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
| 18 #include "base/synchronization/lock.h" | 18 #include "base/synchronization/lock.h" |
| 19 #include "base/task.h" | 19 #include "base/task.h" |
| 20 #include "base/time.h" | 20 #include "base/time.h" |
| 21 #include "base/tracked.h" | 21 #include "base/tracked.h" |
| 22 | 22 |
| 23 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
| 24 // We need this to declare base::MessagePumpWin::Dispatcher, which we should | 24 // We need this to declare base::MessagePumpWin::Dispatcher, which we should |
| 25 // really just eliminate. | 25 // really just eliminate. |
| 26 #include "base/message_pump_win.h" | 26 #include "base/message_pump_win.h" |
| 27 #elif defined(OS_POSIX) | 27 #elif defined(OS_POSIX) |
| 28 #include "base/message_pump_libevent.h" | 28 #include "base/message_pump_libevent.h" |
| 29 #if !defined(OS_MACOSX) | 29 #if !defined(OS_MACOSX) |
| 30 #if defined(TOUCH_UI) | 30 |
| 31 #if defined(USE_WAYLAND) |
| 32 #include "base/message_pump_wayland.h" |
| 33 #elif defined(TOUCH_UI) |
| 31 #include "base/message_pump_x.h" | 34 #include "base/message_pump_x.h" |
| 32 #else | 35 #else |
| 33 #include "base/message_pump_gtk.h" | 36 #include "base/message_pump_gtk.h" |
| 34 #endif | 37 #endif |
| 38 |
| 35 typedef struct _XDisplay Display; | 39 typedef struct _XDisplay Display; |
| 36 #endif | 40 #endif |
| 37 #endif | 41 #endif |
| 38 | 42 |
| 39 namespace base { | 43 namespace base { |
| 40 class Histogram; | 44 class Histogram; |
| 41 } | 45 } |
| 42 | 46 |
| 43 #if defined(TRACK_ALL_TASK_OBJECTS) | 47 #if defined(TRACK_ALL_TASK_OBJECTS) |
| 44 namespace tracked_objects { | 48 namespace tracked_objects { |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 #endif // defined(OS_POSIX) | 692 #endif // defined(OS_POSIX) |
| 689 }; | 693 }; |
| 690 | 694 |
| 691 // Do not add any member variables to MessageLoopForIO! This is important b/c | 695 // Do not add any member variables to MessageLoopForIO! This is important b/c |
| 692 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 696 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
| 693 // data that you need should be stored on the MessageLoop's pump_ instance. | 697 // data that you need should be stored on the MessageLoop's pump_ instance. |
| 694 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 698 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
| 695 MessageLoopForIO_should_not_have_extra_member_variables); | 699 MessageLoopForIO_should_not_have_extra_member_variables); |
| 696 | 700 |
| 697 #endif // BASE_MESSAGE_LOOP_H_ | 701 #endif // BASE_MESSAGE_LOOP_H_ |
| OLD | NEW |