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

Unified Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 11568006: events: Update scroll and touch handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nit Created 8 years 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 | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 1b9aaf27b8e867e01baa732b85d00b87e2f14b6b..9d706bc49f8a7054671b53a3de4da9e50be02efe 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -578,23 +578,23 @@ ui::EventResult DesktopNativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) {
ui::ER_HANDLED : ui::ER_UNHANDLED;
}
-ui::EventResult DesktopNativeWidgetAura::OnScrollEvent(ui::ScrollEvent* event) {
+void DesktopNativeWidgetAura::OnScrollEvent(ui::ScrollEvent* event) {
if (event->type() == ui::ET_SCROLL) {
- ui::EventResult status = native_widget_delegate_->OnScrollEvent(event);
- if (status != ui::ER_UNHANDLED)
- return status;
+ native_widget_delegate_->OnScrollEvent(event);
+ if (event->handled())
+ return;
// Convert unprocessed scroll events into wheel events.
ui::MouseWheelEvent mwe(*static_cast<ui::ScrollEvent*>(event));
- return native_widget_delegate_->OnMouseEvent(mwe) ?
- ui::ER_HANDLED : ui::ER_UNHANDLED;
+ if (native_widget_delegate_->OnMouseEvent(mwe))
+ event->SetHandled();
} else {
- return native_widget_delegate_->OnScrollEvent(event);
+ native_widget_delegate_->OnScrollEvent(event);
}
}
-ui::EventResult DesktopNativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) {
- return native_widget_delegate_->OnTouchEvent(event);
+void DesktopNativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) {
+ native_widget_delegate_->OnTouchEvent(event);
}
void DesktopNativeWidgetAura::OnGestureEvent(ui::GestureEvent* event) {
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698