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

Side by Side Diff: base/message_pump_x.cc

Issue 8566037: aura: Fix unit_tests on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 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 | « no previous file | chrome/browser/profiles/profile_info_cache_unittest.cc » ('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_pump_x.h" 5 #include "base/message_pump_x.h"
6 6
7 #include <X11/extensions/XInput2.h> 7 #include <X11/extensions/XInput2.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 XEvent xev; 176 XEvent xev;
177 XNextEvent(display, &xev); 177 XNextEvent(display, &xev);
178 if (ProcessXEvent(dispatcher, &xev)) 178 if (ProcessXEvent(dispatcher, &xev))
179 return true; 179 return true;
180 } 180 }
181 181
182 return g_main_context_iteration(context, block); 182 return g_main_context_iteration(context, block);
183 } 183 }
184 184
185 bool MessagePumpX::WillProcessXEvent(XEvent* xevent) { 185 bool MessagePumpX::WillProcessXEvent(XEvent* xevent) {
186 if (!observers().might_have_observers())
187 return false;
186 ObserverListBase<MessagePumpObserver>::Iterator it(observers()); 188 ObserverListBase<MessagePumpObserver>::Iterator it(observers());
187 MessagePumpObserver* obs; 189 MessagePumpObserver* obs;
188 while ((obs = it.GetNext()) != NULL) { 190 while ((obs = it.GetNext()) != NULL) {
189 if (obs->WillProcessEvent(xevent)) 191 if (obs->WillProcessEvent(xevent))
190 return true; 192 return true;
191 } 193 }
192 return false; 194 return false;
193 } 195 }
194 196
195 void MessagePumpX::DidProcessXEvent(XEvent* xevent) { 197 void MessagePumpX::DidProcessXEvent(XEvent* xevent) {
196 ObserverListBase<MessagePumpObserver>::Iterator it(observers()); 198 FOR_EACH_OBSERVER(MessagePumpObserver, observers(), DidProcessEvent(xevent));
197 MessagePumpObserver* obs;
198 while ((obs = it.GetNext()) != NULL) {
199 obs->DidProcessEvent(xevent);
200 }
201 } 199 }
202 200
203 } // namespace base 201 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_info_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698