diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-30 20:03:34 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-30 20:03:34 +0000 |
commit | 970aa36e14a969d79bec8525189ecd07b4d70b9d (patch) | |
tree | c7595a32e6a9bc2df362ef25455c74a9a6b22c9c /aura/demo/demo_main.cc | |
parent | c47301e817ee37825b18ea9e1e9fdd2aa7ce6e0f (diff) | |
download | chromium_src-970aa36e14a969d79bec8525189ecd07b4d70b9d.zip chromium_src-970aa36e14a969d79bec8525189ecd07b4d70b9d.tar.gz chromium_src-970aa36e14a969d79bec8525189ecd07b4d70b9d.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
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98850
Review URL: http://codereview.chromium.org/7791030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'aura/demo/demo_main.cc')
-rw-r--r-- | aura/demo/demo_main.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/aura/demo/demo_main.cc b/aura/demo/demo_main.cc index 09cfc29..2cdeb66 100644 --- a/aura/demo/demo_main.cc +++ b/aura/demo/demo_main.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "aura/desktop.h" +#include "aura/event.h" #include "aura/window.h" #include "aura/window_delegate.h" #include "base/at_exit.h" @@ -12,7 +13,6 @@ #include "third_party/skia/include/core/SkXfermode.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_paths.h" -#include "ui/gfx/canvas.h" #include "ui/gfx/canvas_skia.h" #include "ui/gfx/rect.h" @@ -23,10 +23,17 @@ class DemoWindowDelegate : public aura::WindowDelegate { public: explicit DemoWindowDelegate(SkColor color) : color_(color) {} + virtual bool OnMouseEvent(const aura::MouseEvent& event) OVERRIDE { + return true; + } + virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { canvas->AsCanvasSkia()->drawColor(color_, SkXfermode::kSrc_Mode); } + virtual void OnWindowDestroyed() OVERRIDE { + } + private: SkColor color_; |