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

Unified Diff: aura/demo/demo_main.cc

Issue 7791030: Proper MouseEvent targeting. Adds a Window method that locates a Window for a given point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « aura/aura.gyp ('k') | aura/desktop.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: aura/demo/demo_main.cc
===================================================================
--- aura/demo/demo_main.cc (revision 98852)
+++ aura/demo/demo_main.cc (working copy)
@@ -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 @@
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_;
« no previous file with comments | « aura/aura.gyp ('k') | aura/desktop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698