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

Unified Diff: base/message_loop.h

Issue 112032: Promotes Add/RemoveObserver to MessageLoop for linux. Because... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base.gyp ('k') | base/message_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.h
===================================================================
--- base/message_loop.h (revision 16288)
+++ base/message_loop.h (working copy)
@@ -25,6 +25,9 @@
#elif defined(OS_POSIX)
#include "base/message_pump_libevent.h"
#endif
+#if defined(OS_LINUX)
+#include "base/message_pump_glib.h"
+#endif
// A MessageLoop is used to process events for a particular thread. There is
// at most one MessageLoop instance per thread.
@@ -413,18 +416,28 @@
return static_cast<MessageLoopForUI*>(loop);
}
+#if defined(OS_LINUX)
+ typedef base::MessagePumpForUI::Observer Observer;
+
+ // See message_pump_glib for definitions of these methods.
+ void AddObserver(Observer* observer);
+ void RemoveObserver(Observer* observer);
+#endif
+
#if defined(OS_WIN)
typedef base::MessagePumpWin::Dispatcher Dispatcher;
typedef base::MessagePumpWin::Observer Observer;
// Please see MessagePumpWin for definitions of these methods.
- void Run(Dispatcher* dispatcher);
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
+ void Run(Dispatcher* dispatcher);
void WillProcessMessage(const MSG& message);
void DidProcessMessage(const MSG& message);
void PumpOutPendingPaintMessages();
+#endif
+#if defined(OS_WIN) || defined(OS_LINUX)
protected:
// TODO(rvargas): Make this platform independent.
base::MessagePumpForUI* pump_ui() {
« no previous file with comments | « base/base.gyp ('k') | base/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698