OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 lazy_tls_ptr.Pointer()->Set(this); | 131 lazy_tls_ptr.Pointer()->Set(this); |
132 | 132 |
133 // TODO(rvargas): Get rid of the OS guards. | 133 // TODO(rvargas): Get rid of the OS guards. |
134 #if defined(OS_WIN) | 134 #if defined(OS_WIN) |
135 #define MESSAGE_PUMP_UI new base::MessagePumpForUI() | 135 #define MESSAGE_PUMP_UI new base::MessagePumpForUI() |
136 #define MESSAGE_PUMP_IO new base::MessagePumpForIO() | 136 #define MESSAGE_PUMP_IO new base::MessagePumpForIO() |
137 #elif defined(OS_MACOSX) | 137 #elif defined(OS_MACOSX) |
138 #define MESSAGE_PUMP_UI base::MessagePumpMac::Create() | 138 #define MESSAGE_PUMP_UI base::MessagePumpMac::Create() |
139 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() | 139 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() |
140 #elif defined(TOUCH_UI) | 140 #elif defined(TOUCH_UI) |
141 #define MESSAGE_PUMP_UI new base::MessagePumpGlibX() | 141 // TODO(sadrul): enable the new message pump when ready |
| 142 #define MESSAGE_PUMP_UI new base::MessagePumpForUI() |
142 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() | 143 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() |
143 #elif defined(OS_POSIX) // POSIX but not MACOSX. | 144 #elif defined(OS_POSIX) // POSIX but not MACOSX. |
144 #define MESSAGE_PUMP_UI new base::MessagePumpForUI() | 145 #define MESSAGE_PUMP_UI new base::MessagePumpForUI() |
145 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() | 146 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() |
146 #else | 147 #else |
147 #error Not implemented | 148 #error Not implemented |
148 #endif | 149 #endif |
149 | 150 |
150 if (type_ == TYPE_UI) { | 151 if (type_ == TYPE_UI) { |
151 pump_ = MESSAGE_PUMP_UI; | 152 pump_ = MESSAGE_PUMP_UI; |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 Watcher *delegate) { | 687 Watcher *delegate) { |
687 return pump_libevent()->WatchFileDescriptor( | 688 return pump_libevent()->WatchFileDescriptor( |
688 fd, | 689 fd, |
689 persistent, | 690 persistent, |
690 static_cast<base::MessagePumpLibevent::Mode>(mode), | 691 static_cast<base::MessagePumpLibevent::Mode>(mode), |
691 controller, | 692 controller, |
692 delegate); | 693 delegate); |
693 } | 694 } |
694 | 695 |
695 #endif | 696 #endif |
OLD | NEW |