diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-05 02:34:06 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-05 02:34:06 +0000 |
commit | 9e599a93b7f032350fb16d4eed59c0ebc3b15db2 (patch) | |
tree | 9ca5511758c5034be4b402af9e1d55d9ecb64cf7 /ui/aura/window_tree_host_ozone.h | |
parent | f1ccdf3d94a2aaa22c2b4d4371b9539a7324ee68 (diff) | |
download | chromium_src-9e599a93b7f032350fb16d4eed59c0ebc3b15db2.zip chromium_src-9e599a93b7f032350fb16d4eed59c0ebc3b15db2.tar.gz chromium_src-9e599a93b7f032350fb16d4eed59c0ebc3b15db2.tar.bz2 |
ozone: Use PlatformEventSource for dispatching events.
Notable changes:
* Convert EventFactoryOzone into a PlatformEventSource.
* Convert WindowTreeHostOzone into a PlatformEventDispatcher.
* The WindowTreeHostOzone looks at the location of the event for mouse, scroll
and touch-events to decide whether it should dispatch the event or not. It
expects the event-location it receives to be in the same coordinate space as
its bounds.
* Adds an ObserverList in MessagePumpOzone, and the EventFactoryOzone reaches
into the message-pump to trigger these observers. This is a short-term
workaround (the same is done for X11 in http://crrev.com/219743002/), until
the message-pump observers are converted into PlatformEventObservers.
* Have EventConverterEvdev take in a callback that can be used for dispatching
events it receives. The EventFactoryEvdev sets this callback to each of these
converters after creation.
* Change the asynchronous event-dispatch to be synchronous.
This set of changes allows dispatching events to multiple window-tree hosts (at
least in theory).
BUG=319986
R=rjkroege@chromium.org, spang@chromium.org
Review URL: https://codereview.chromium.org/223363003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261953 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window_tree_host_ozone.h')
-rw-r--r-- | ui/aura/window_tree_host_ozone.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ui/aura/window_tree_host_ozone.h b/ui/aura/window_tree_host_ozone.h index dadae63c..0e1f469 100644 --- a/ui/aura/window_tree_host_ozone.h +++ b/ui/aura/window_tree_host_ozone.h @@ -8,9 +8,9 @@ #include <vector> #include "base/memory/scoped_ptr.h" -#include "base/message_loop/message_pump_dispatcher.h" #include "ui/aura/window_tree_host.h" #include "ui/events/event_source.h" +#include "ui/events/platform/platform_event_dispatcher.h" #include "ui/gfx/insets.h" #include "ui/gfx/rect.h" @@ -18,16 +18,17 @@ namespace aura { class WindowTreeHostOzone : public WindowTreeHost, public ui::EventSource, - public base::MessagePumpDispatcher { + public ui::PlatformEventDispatcher { public: explicit WindowTreeHostOzone(const gfx::Rect& bounds); virtual ~WindowTreeHostOzone(); private: - // Overridden from Dispatcher overrides: - virtual uint32_t Dispatch(const base::NativeEvent& event) OVERRIDE; + // ui::PlatformEventDispatcher: + virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; + virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; - // WindowTreeHost Overrides. + // WindowTreeHost: virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; virtual void Show() OVERRIDE; virtual void Hide() OVERRIDE; |