Index: ui/aura/dispatcher_linux.h |
diff --git a/ui/aura/dispatcher_linux.h b/ui/aura/dispatcher_linux.h |
index c18cc3073c19f29624868d4a55b09146b1849529..88104b6585b5353a543461b3e2c84e9b0702a109 100644 |
--- a/ui/aura/dispatcher_linux.h |
+++ b/ui/aura/dispatcher_linux.h |
@@ -7,6 +7,7 @@ |
#pragma once |
#include <map> |
+#include <vector> |
#include <X11/Xlib.h> |
// Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. |
#undef RootWindow |
@@ -23,9 +24,15 @@ class DispatcherLinux : public MessageLoop::Dispatcher, |
DispatcherLinux(); |
virtual ~DispatcherLinux(); |
- void WindowDispatcherCreated(::Window window, |
- MessageLoop::Dispatcher* dispatcher); |
- void WindowDispatcherDestroying(::Window window); |
+ // Adds/Removes |dispatcher| for the |x_window|. |
+ void AddDispatcherForWindow(MessageLoop::Dispatcher* dispatcher, |
+ ::Window x_window); |
+ void RemoveDispatcherForWindow(::Window x_window); |
+ |
+ // Adds/Removes |dispatcher| to receive all events sent to the X |
+ // root window. |
+ void AddDispatcherForRootWindow(MessageLoop::Dispatcher* dispatcher); |
+ void RemoveDispatcherForRootWindow(MessageLoop::Dispatcher* dispatcher); |
// Overridden from MessageLoop::Dispatcher: |
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; |
@@ -37,10 +44,14 @@ class DispatcherLinux : public MessageLoop::Dispatcher, |
private: |
typedef std::map< ::Window, MessageLoop::Dispatcher* > DispatchersMap; |
+ typedef std::vector<MessageLoop::Dispatcher*> Dispatchers; |
MessageLoop::Dispatcher* GetDispatcherForXEvent(XEvent* xev) const; |
DispatchersMap dispatchers_; |
+ Dispatchers root_window_dispatchers_; |
+ |
+ ::Window x_root_window_; |
DISALLOW_COPY_AND_ASSIGN(DispatcherLinux); |
}; |