Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Side by Side Diff: base/message_loop.cc

Issue 8931009: Revert "Refactor MessagePumpX to dispatch events inside of the source Dispatch function." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/base.gypi ('k') | base/message_pump_glib.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 message_loop_proxy_ = new base::MessageLoopProxyImpl(); 141 message_loop_proxy_ = new base::MessageLoopProxyImpl();
142 142
143 // TODO(rvargas): Get rid of the OS guards. 143 // TODO(rvargas): Get rid of the OS guards.
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)
151 #define MESSAGE_PUMP_UI new base::MessagePumpForUI()
152 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent()
153 #elif defined(USE_WAYLAND)
154 #define MESSAGE_PUMP_UI new base::MessagePumpWayland()
155 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent()
156 #elif defined(USE_AURA)
157 #define MESSAGE_PUMP_UI new base::MessagePumpX()
158 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent()
150 #elif defined(OS_NACL) 159 #elif defined(OS_NACL)
151 // Currently NaCl doesn't have a UI or an IO MessageLoop. 160 // Currently NaCl doesn't have a UI or an IO MessageLoop.
152 // TODO(abarth): Figure out if we need these. 161 // TODO(abarth): Figure out if we need these.
153 #define MESSAGE_PUMP_UI NULL 162 #define MESSAGE_PUMP_UI NULL
154 #define MESSAGE_PUMP_IO NULL 163 #define MESSAGE_PUMP_IO NULL
155 #elif defined(OS_POSIX) // POSIX but not MACOSX. 164 #elif defined(OS_POSIX) // POSIX but not MACOSX.
156 #define MESSAGE_PUMP_UI new base::MessagePumpForUI() 165 #define MESSAGE_PUMP_UI new base::MessagePumpGtk()
157 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() 166 #define MESSAGE_PUMP_IO new base::MessagePumpLibevent()
158 #else 167 #else
159 #error Not implemented 168 #error Not implemented
160 #endif 169 #endif
161 170
162 if (type_ == TYPE_UI) { 171 if (type_ == TYPE_UI) {
163 if (message_pump_for_ui_factory_) 172 if (message_pump_for_ui_factory_)
164 pump_ = message_pump_for_ui_factory_(); 173 pump_ = message_pump_for_ui_factory_();
165 else 174 else
166 pump_ = MESSAGE_PUMP_UI; 175 pump_ = MESSAGE_PUMP_UI;
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 Watcher *delegate) { 836 Watcher *delegate) {
828 return pump_libevent()->WatchFileDescriptor( 837 return pump_libevent()->WatchFileDescriptor(
829 fd, 838 fd,
830 persistent, 839 persistent,
831 static_cast<base::MessagePumpLibevent::Mode>(mode), 840 static_cast<base::MessagePumpLibevent::Mode>(mode),
832 controller, 841 controller,
833 delegate); 842 delegate);
834 } 843 }
835 844
836 #endif 845 #endif
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/message_pump_glib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698