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

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: renamed methods, fixed comment 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') | no next file with comments »
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..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);
};
« no previous file with comments | « no previous file | ui/aura/dispatcher_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698