diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-30 18:32:33 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-30 18:32:33 +0000 |
commit | ddf5ff7b90b443c64c124f328cbc5b2f133de601 (patch) | |
tree | 95aaf27f61722a470209a3fa8c150a9a8ad2546c /aura/event.cc | |
parent | 5466c9f369999f03d9067fd01953ce326ac3affd (diff) | |
download | chromium_src-ddf5ff7b90b443c64c124f328cbc5b2f133de601.zip chromium_src-ddf5ff7b90b443c64c124f328cbc5b2f133de601.tar.gz chromium_src-ddf5ff7b90b443c64c124f328cbc5b2f133de601.tar.bz2 |
Proper MouseEvent targeting. Adds a Window method that locates a Window for a given point.
Also adds an Aura test suite.
http://crbug.com/93933
http://crbug.com/93943
TEST=see unittest
Review URL: http://codereview.chromium.org/7791030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98850 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'aura/event.cc')
-rw-r--r-- | aura/event.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/aura/event.cc b/aura/event.cc index 2a62a4c..055f004 100644 --- a/aura/event.cc +++ b/aura/event.cc @@ -4,6 +4,8 @@ #include "aura/event.h" +#include "aura/window.h" + namespace aura { Event::Event(ui::EventType type, int flags) @@ -27,5 +29,18 @@ Event::Event(const Event& copy) flags_(copy.flags_) { } +LocatedEvent::LocatedEvent(const LocatedEvent& model, + Window* source, + Window* target) + : Event(model), + location_(model.location_) { + if (target && target != source) + Window::ConvertPointToWindow(source, target, &location_); +} + +MouseEvent::MouseEvent(const MouseEvent& model, Window* source, Window* target) + : LocatedEvent(model, source, target) { +} + } // namespace aura |