Chromium Code Reviews| 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 #include "base/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 #if defined(OS_WIN) | 144 #if defined(OS_WIN) |
| 145 #define MESSAGE_PUMP_UI new base::MessagePumpForUI() | 145 #define MESSAGE_PUMP_UI new base::MessagePumpForUI() |
| 146 #define MESSAGE_PUMP_IO new base::MessagePumpForIO() | 146 #define MESSAGE_PUMP_IO new base::MessagePumpForIO() |
| 147 #elif defined(OS_MACOSX) | 147 #elif defined(OS_MACOSX) |
| 148 #define MESSAGE_PUMP_UI base::MessagePumpMac::Create() | 148 #define MESSAGE_PUMP_UI base::MessagePumpMac::Create() |
| 149 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() | 149 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() |
| 150 #elif defined(OS_ANDROID) | 150 #elif defined(OS_ANDROID) |
| 151 #define MESSAGE_PUMP_UI new base::MessagePumpForUI() | 151 #define MESSAGE_PUMP_UI new base::MessagePumpForUI() |
| 152 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() | 152 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() |
| 153 #elif defined(USE_WAYLAND) | 153 #elif defined(USE_WAYLAND) |
| 154 #define MESSAGE_PUMP_UI new base::MessagePumpWayland() | 154 #define MESSAGE_PUMP_UI new base::MessagePumpGlib() |
| 155 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() | 155 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() |
| 156 #elif defined(USE_AURA) | 156 #elif defined(USE_AURA) |
| 157 #define MESSAGE_PUMP_UI new base::MessagePumpX() | 157 #define MESSAGE_PUMP_UI new base::MessagePumpX() |
|
sadrul
2011/12/09 02:56:15
I think both MessagePumpGlib (for wayland) and Mes
piman
2011/12/09 03:46:51
Good point, we can even go one step further, and m
| |
| 158 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() | 158 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() |
| 159 #elif defined(OS_NACL) | 159 #elif defined(OS_NACL) |
| 160 // Currently NaCl doesn't have a UI or an IO MessageLoop. | 160 // Currently NaCl doesn't have a UI or an IO MessageLoop. |
| 161 // TODO(abarth): Figure out if we need these. | 161 // TODO(abarth): Figure out if we need these. |
| 162 #define MESSAGE_PUMP_UI NULL | 162 #define MESSAGE_PUMP_UI NULL |
| 163 #define MESSAGE_PUMP_IO NULL | 163 #define MESSAGE_PUMP_IO NULL |
| 164 #elif defined(OS_POSIX) // POSIX but not MACOSX. | 164 #elif defined(OS_POSIX) // POSIX but not MACOSX. |
| 165 #define MESSAGE_PUMP_UI new base::MessagePumpGtk() | 165 #define MESSAGE_PUMP_UI new base::MessagePumpGtk() |
| 166 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() | 166 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() |
| 167 #else | 167 #else |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 836 Watcher *delegate) { | 836 Watcher *delegate) { |
| 837 return pump_libevent()->WatchFileDescriptor( | 837 return pump_libevent()->WatchFileDescriptor( |
| 838 fd, | 838 fd, |
| 839 persistent, | 839 persistent, |
| 840 static_cast<base::MessagePumpLibevent::Mode>(mode), | 840 static_cast<base::MessagePumpLibevent::Mode>(mode), |
| 841 controller, | 841 controller, |
| 842 delegate); | 842 delegate); |
| 843 } | 843 } |
| 844 | 844 |
| 845 #endif | 845 #endif |
| OLD | NEW |