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

Unified Diff: base/message_pump_x.h

Issue 8021009: Consolidate message observer API for win and aura (and touch). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 3 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
Index: base/message_pump_x.h
diff --git a/base/message_pump_x.h b/base/message_pump_x.h
index eab6f6bad1195c90014c2b59c08cbff930c2013a..39d7d9c65bce1cd926156d9947e417af13d968de 100644
--- a/base/message_pump_x.h
+++ b/base/message_pump_x.h
@@ -7,6 +7,7 @@
#include "base/message_pump.h"
#include "base/message_pump_glib.h"
+#include "base/message_pump_observer.h"
#include <bitset>
@@ -16,30 +17,11 @@
#include <gtk/gtk.h>
#endif
-typedef union _XEvent XEvent;
typedef struct _XDisplay Display;
namespace base {
// The documentation for this class is in message_pump_glib.h
-class BASE_EXPORT MessagePumpObserver {
- public:
- enum EventStatus {
- EVENT_CONTINUE, // The event should be dispatched as normal.
- EVENT_HANDLED // The event should not be processed any farther.
- };
-
- // This method is called before processing an XEvent. If the method returns
- // EVENT_HANDLED, it indicates the event has already been handled, so the
- // event is not processed any farther. If the method returns EVENT_CONTINUE,
- // the event dispatching proceeds as normal.
- virtual EventStatus WillProcessXEvent(XEvent* xevent);
-
- protected:
- virtual ~MessagePumpObserver() {}
-};
-
-// The documentation for this class is in message_pump_glib.h
//
// The nested loop is exited by either posting a quit, or returning EVENT_QUIT
// from Dispatch.
@@ -97,6 +79,7 @@ class BASE_EXPORT MessagePumpX : public MessagePumpGlib {
// not send the event to any other observers and returns true. Returns false
// if no observer returns true.
bool WillProcessXEvent(XEvent* xevent);
+ void DidProcessXEvent(XEvent* xevent);
#if defined(TOOLKIT_USES_GTK)
// Some XEvent's can't be directly read from X event queue and will go
// through GDK's dispatching process and may get discarded. This function

Powered by Google App Engine
This is Rietveld 408576698