| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/aura/event_filter.h" | 5 #include "ui/aura/event_filter.h" |
| 6 | 6 |
| 7 #include "ui/aura/window.h" | 7 #include "ui/aura/window.h" |
| 8 #include "ui/base/events/event.h" | 8 #include "ui/base/events/event.h" |
| 9 | 9 |
| 10 namespace aura { | 10 namespace aura { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 ui::EventResult EventFilter::OnMouseEvent(ui::MouseEvent* event) { | 35 ui::EventResult EventFilter::OnMouseEvent(ui::MouseEvent* event) { |
| 36 return PreHandleMouseEvent(static_cast<Window*>(event->target()), event) ? | 36 return PreHandleMouseEvent(static_cast<Window*>(event->target()), event) ? |
| 37 ui::ER_CONSUMED : ui::ER_UNHANDLED; | 37 ui::ER_CONSUMED : ui::ER_UNHANDLED; |
| 38 } | 38 } |
| 39 | 39 |
| 40 ui::EventResult EventFilter::OnScrollEvent(ui::ScrollEvent* event) { | 40 ui::EventResult EventFilter::OnScrollEvent(ui::ScrollEvent* event) { |
| 41 return ui::ER_UNHANDLED; | 41 return ui::ER_UNHANDLED; |
| 42 } | 42 } |
| 43 | 43 |
| 44 ui::TouchStatus EventFilter::OnTouchEvent(ui::TouchEvent* event) { | 44 ui::EventResult EventFilter::OnTouchEvent(ui::TouchEvent* event) { |
| 45 return PreHandleTouchEvent(static_cast<Window*>(event->target()), event); | 45 ui::TouchStatus status = PreHandleTouchEvent( |
| 46 static_cast<Window*>(event->target()), event); |
| 47 return ui::EventResultFromTouchStatus(status); |
| 46 } | 48 } |
| 47 | 49 |
| 48 ui::EventResult EventFilter::OnGestureEvent(ui::GestureEvent* event) { | 50 ui::EventResult EventFilter::OnGestureEvent(ui::GestureEvent* event) { |
| 49 return PreHandleGestureEvent(static_cast<Window*>(event->target()), event); | 51 return PreHandleGestureEvent(static_cast<Window*>(event->target()), event); |
| 50 } | 52 } |
| 51 | 53 |
| 52 } // namespace aura | 54 } // namespace aura |
| OLD | NEW |