Index: ui/aura/dispatcher_linux.h |
diff --git a/ui/aura/dispatcher_linux.h b/ui/aura/dispatcher_linux.h |
index c18cc3073c19f29624868d4a55b09146b1849529..fc0201fb1c9c722bdd3a982887f82446b27d3df8 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); |
+ // Registers/Unregisters |dispatcher| for the |x_window|. |
+ void RegisterDispatcherForWindow(MessageLoop::Dispatcher* dispatcher, |
Ben Goodger (Google)
2012/05/22 23:44:40
AddDispatcher
oshima
2012/05/23 00:31:06
Done.
|
+ ::Window x_window); |
+ void UnregisterDispatcherForWindow(::Window x_window); |
Ben Goodger (Google)
2012/05/22 23:44:40
RemoveDispatcher
oshima
2012/05/23 00:31:06
Done.
|
+ |
+ // Registers/Unregisters |dispatcher| to receive all events sent to the X |
+ // root wnidow. |
Ben Goodger (Google)
2012/05/22 23:44:40
window.
oshima
2012/05/23 00:31:06
Done.
|
+ void RegisterDispatcherForRootWindow(MessageLoop::Dispatcher* dispatcher); |
+ void UnregisterDispatcherForRootWindow(MessageLoop::Dispatcher* dispatcher); |
Ben Goodger (Google)
2012/05/22 23:44:40
etc
oshima
2012/05/23 00:31:06
Done.
|
// 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); |
}; |