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

Side by Side Diff: base/message_loop/message_pump_x11.cc

Issue 233653002: x11: Remove MessagePumpObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 8 months 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/message_loop/message_pump_x11.h ('k') | ui/aura/window_tree_host_x11.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_pump_x11.h" 5 #include "base/message_loop/message_pump_x11.h"
6 6
7 #include <glib.h> 7 #include <glib.h>
8 #include <X11/X.h> 8 #include <X11/X.h>
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #include <X11/XKBlib.h> 10 #include <X11/XKBlib.h>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return static_cast<MessagePumpX11*>(loop->pump_gpu()); 53 return static_cast<MessagePumpX11*>(loop->pump_gpu());
54 } 54 }
55 #else 55 #else
56 // static 56 // static
57 MessagePumpX11* MessagePumpX11::Current() { 57 MessagePumpX11* MessagePumpX11::Current() {
58 MessageLoopForUI* loop = MessageLoopForUI::current(); 58 MessageLoopForUI* loop = MessageLoopForUI::current();
59 return static_cast<MessagePumpX11*>(loop->pump_ui()); 59 return static_cast<MessagePumpX11*>(loop->pump_ui());
60 } 60 }
61 #endif 61 #endif
62 62
63 void MessagePumpX11::AddObserver(MessagePumpObserver* observer) {
64 observers_.AddObserver(observer);
65 }
66
67 void MessagePumpX11::RemoveObserver(MessagePumpObserver* observer) {
68 observers_.RemoveObserver(observer);
69 }
70
71 void MessagePumpX11::WillProcessXEvent(XEvent* xevent) {
72 FOR_EACH_OBSERVER(MessagePumpObserver, observers_, WillProcessEvent(xevent));
73 }
74
75 void MessagePumpX11::DidProcessXEvent(XEvent* xevent) {
76 FOR_EACH_OBSERVER(MessagePumpObserver, observers_, DidProcessEvent(xevent));
77 }
78
79 } // namespace base 63 } // namespace base
OLDNEW
« no previous file with comments | « base/message_loop/message_pump_x11.h ('k') | ui/aura/window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698