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

Unified Diff: ui/aura/demo/demo_main.cc

Issue 10908127: events: Move EventTarget into Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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 | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/aura/event_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/demo/demo_main.cc
diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc
index a03585f1df90f2853532e23f43dd9c0bf845e5ae..dd807654484fd2d5c88cebd7bb31dd0150c895d4 100644
--- a/ui/aura/demo/demo_main.cc
+++ b/ui/aura/demo/demo_main.cc
@@ -42,9 +42,6 @@ class DemoWindowDelegate : public aura::WindowDelegate {
const gfx::Rect& new_bounds) OVERRIDE {}
virtual void OnFocus(aura::Window* old_focused_window) OVERRIDE {}
virtual void OnBlur() OVERRIDE {}
- virtual bool OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
- return false;
- }
virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE {
return gfx::kNullCursor;
}
@@ -56,16 +53,6 @@ class DemoWindowDelegate : public aura::WindowDelegate {
const gfx::Point& location) OVERRIDE {
return true;
}
- virtual bool OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- return true;
- }
- virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
- return ui::TOUCH_STATUS_END;
- }
- virtual ui::EventResult OnGestureEvent(
- ui::GestureEvent* event) OVERRIDE {
- return ui::ER_UNHANDLED;
- }
virtual bool CanFocus() OVERRIDE { return true; }
virtual void OnCaptureLost() OVERRIDE {}
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
@@ -78,6 +65,20 @@ class DemoWindowDelegate : public aura::WindowDelegate {
virtual bool HasHitTestMask() const OVERRIDE { return false; }
virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE {}
+ // Overridden from ui::EventHandler:
+ virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
+ return ui::ER_UNHANDLED;
+ }
+ virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ return ui::ER_HANDLED;
+ }
+ virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
+ return ui::TOUCH_STATUS_END;
+ }
+ virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ return ui::ER_UNHANDLED;
+ }
+
private:
SkColor color_;
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/aura/event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698