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 #include "base/message_loop/message_loop.h" | 5 #include "base/message_loop/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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #if defined(OS_MACOSX) | 26 #if defined(OS_MACOSX) |
27 #include "base/message_loop/message_pump_mac.h" | 27 #include "base/message_loop/message_pump_mac.h" |
28 #endif | 28 #endif |
29 #if defined(OS_POSIX) && !defined(OS_IOS) | 29 #if defined(OS_POSIX) && !defined(OS_IOS) |
30 #include "base/message_loop/message_pump_libevent.h" | 30 #include "base/message_loop/message_pump_libevent.h" |
31 #endif | 31 #endif |
32 #if defined(OS_ANDROID) | 32 #if defined(OS_ANDROID) |
33 #include "base/message_loop/message_pump_android.h" | 33 #include "base/message_loop/message_pump_android.h" |
34 #endif | 34 #endif |
| 35 #if defined(OS_LINUX) |
| 36 #include "base/message_loop/message_pump_x11.h" |
| 37 #endif |
35 | 38 |
36 #if defined(TOOLKIT_GTK) | 39 #if defined(TOOLKIT_GTK) |
37 #include <gdk/gdk.h> | 40 #include <gdk/gdk.h> |
38 #include <gdk/gdkx.h> | 41 #include <gdk/gdkx.h> |
39 #endif | 42 #endif |
40 | 43 |
41 namespace base { | 44 namespace base { |
42 | 45 |
43 namespace { | 46 namespace { |
44 | 47 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 #error Not implemented | 180 #error Not implemented |
178 #endif | 181 #endif |
179 | 182 |
180 if (type_ == TYPE_UI) { | 183 if (type_ == TYPE_UI) { |
181 if (message_pump_for_ui_factory_) | 184 if (message_pump_for_ui_factory_) |
182 pump_.reset(message_pump_for_ui_factory_()); | 185 pump_.reset(message_pump_for_ui_factory_()); |
183 else | 186 else |
184 pump_.reset(MESSAGE_PUMP_UI); | 187 pump_.reset(MESSAGE_PUMP_UI); |
185 } else if (type_ == TYPE_IO) { | 188 } else if (type_ == TYPE_IO) { |
186 pump_.reset(MESSAGE_PUMP_IO); | 189 pump_.reset(MESSAGE_PUMP_IO); |
| 190 #if defined(OS_LINUX) |
| 191 } else if (type_ == TYPE_GPU) { |
| 192 pump_.reset(new MessagePumpX11()); |
| 193 #endif |
187 #if defined(OS_ANDROID) | 194 #if defined(OS_ANDROID) |
188 } else if (type_ == TYPE_JAVA) { | 195 } else if (type_ == TYPE_JAVA) { |
189 pump_.reset(MESSAGE_PUMP_UI); | 196 pump_.reset(MESSAGE_PUMP_UI); |
190 #endif | 197 #endif |
191 } else { | 198 } else { |
192 DCHECK_EQ(TYPE_DEFAULT, type_); | 199 DCHECK_EQ(TYPE_DEFAULT, type_); |
193 pump_.reset(new MessagePumpDefault()); | 200 pump_.reset(new MessagePumpDefault()); |
194 } | 201 } |
195 } | 202 } |
196 | 203 |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 fd, | 752 fd, |
746 persistent, | 753 persistent, |
747 mode, | 754 mode, |
748 controller, | 755 controller, |
749 delegate); | 756 delegate); |
750 } | 757 } |
751 | 758 |
752 #endif | 759 #endif |
753 | 760 |
754 } // namespace base | 761 } // namespace base |
OLD | NEW |