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

Unified Diff: ui/aura/dispatcher_linux.h

Issue 10407081: Multiple dispatchers for root windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | « no previous file | ui/aura/dispatcher_linux.cc » ('j') | ui/aura/dispatcher_linux.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/dispatcher_linux.h
diff --git a/ui/aura/dispatcher_linux.h b/ui/aura/dispatcher_linux.h
index c18cc3073c19f29624868d4a55b09146b1849529..e7c7ef2e1df961402ae2aa45dbe3aad64d79a70d 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,14 @@ class DispatcherLinux : public MessageLoop::Dispatcher,
DispatcherLinux();
virtual ~DispatcherLinux();
- void WindowDispatcherCreated(::Window window,
- MessageLoop::Dispatcher* dispatcher);
- void WindowDispatcherDestroying(::Window window);
+ // Register/Unregister Dispatcher for the |window|.
+ void RegisterDispatcher(::Window window,
Daniel Erat 2012/05/22 14:33:42 nit: rename to RegisterWindowDispatcher() or Rende
oshima 2012/05/22 19:50:02 Agreed. Renamed to RegisterDispatcherFor{Root}Wind
+ MessageLoop::Dispatcher* dispatcher);
+ void UnregisterDispatcher(::Window window);
+
+ // Register/Unregister Dispatchers for RootWindow.
Daniel Erat 2012/05/22 14:33:42 nit: reword this comment to something like: // Re
oshima 2012/05/22 19:50:02 Done.
+ void RegisterRootWindowDispatcher(MessageLoop::Dispatcher* dispatcher);
+ void UnregisterRootWindowDispatcher(MessageLoop::Dispatcher* dispatcher);
// Overridden from MessageLoop::Dispatcher:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
@@ -37,10 +43,15 @@ 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;
+ void DispatchRootWindowEvent(XEvent* xev);
DispatchersMap dispatchers_;
+ Dispatchers root_window_dispatchers_;
+
+ ::Window root_window_;
Daniel Erat 2012/05/22 14:33:42 nit: rename to |x_root_window_|?
oshima 2012/05/22 19:50:02 Done.
DISALLOW_COPY_AND_ASSIGN(DispatcherLinux);
};
« no previous file with comments | « no previous file | ui/aura/dispatcher_linux.cc » ('j') | ui/aura/dispatcher_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698