Index: base/message_loop/message_pump_aurax11.h |
diff --git a/base/message_loop/message_pump_aurax11.h b/base/message_loop/message_pump_aurax11.h |
index 89089ad535cfc62b39fbf2d145ac8598e05d6cf8..52647c30e2ee575e688c49754b793c1143795bdc 100644 |
--- a/base/message_loop/message_pump_aurax11.h |
+++ b/base/message_loop/message_pump_aurax11.h |
@@ -58,6 +58,13 @@ class BASE_EXPORT MessagePumpAuraX11 : public MessagePumpGlib, |
void AddDispatcherForRootWindow(MessagePumpDispatcher* dispatcher); |
void RemoveDispatcherForRootWindow(MessagePumpDispatcher* dispatcher); |
+ // Adds an Observer, which will start receiving notifications immediately. |
+ void AddObserver(MessagePumpObserver* observer); |
+ |
+ // Removes an Observer. It is safe to call this method while an Observer is |
+ // receiving a notification callback. |
+ void RemoveObserver(MessagePumpObserver* observer); |
+ |
// Internal function. Called by the glib source dispatch function. Processes |
// all available X events. |
bool DispatchXEvents(); |
@@ -92,6 +99,8 @@ class BASE_EXPORT MessagePumpAuraX11 : public MessagePumpGlib, |
// Returns the Dispatcher based on the event's target window. |
MessagePumpDispatcher* GetDispatcherForXEvent(const NativeEvent& xev) const; |
+ ObserverList<MessagePumpObserver>& observers() { return observers_; } |
+ |
// Overridden from MessagePumpDispatcher: |
virtual bool Dispatch(const NativeEvent& event) OVERRIDE; |
@@ -108,6 +117,9 @@ class BASE_EXPORT MessagePumpAuraX11 : public MessagePumpGlib, |
// additions. |
ObserverList<MessagePumpDispatcher> root_window_dispatchers_; |
+ // List of observers. |
+ ObserverList<MessagePumpObserver> observers_; |
+ |
unsigned long x_root_window_; |
DISALLOW_COPY_AND_ASSIGN(MessagePumpAuraX11); |