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

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

Issue 11592011: events: Update mouse-event handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 36c4fba392b4363df8225cca3b4beebf735bc6dc..ca09d1d09973029a593fff241ad15c535a16702a 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -566,15 +566,15 @@ void DesktopNativeWidgetAura::OnKeyEvent(ui::KeyEvent* event) {
event->SetHandled();
}
-ui::EventResult DesktopNativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) {
+void DesktopNativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) {
DCHECK(window_->IsVisible());
if (event->type() == ui::ET_MOUSEWHEEL) {
- return native_widget_delegate_->OnMouseEvent(*event) ?
- ui::ER_HANDLED : ui::ER_UNHANDLED;
+ native_widget_delegate_->OnMouseEvent(event);
+ if (event->handled())
+ return;
}
- return native_widget_delegate_->OnMouseEvent(*event) ?
- ui::ER_HANDLED : ui::ER_UNHANDLED;
+ native_widget_delegate_->OnMouseEvent(event);
}
void DesktopNativeWidgetAura::OnScrollEvent(ui::ScrollEvent* event) {
@@ -585,7 +585,8 @@ void DesktopNativeWidgetAura::OnScrollEvent(ui::ScrollEvent* event) {
// Convert unprocessed scroll events into wheel events.
ui::MouseWheelEvent mwe(*static_cast<ui::ScrollEvent*>(event));
- if (native_widget_delegate_->OnMouseEvent(mwe))
+ native_widget_delegate_->OnMouseEvent(&mwe);
+ if (mwe.handled())
event->SetHandled();
} else {
native_widget_delegate_->OnScrollEvent(event);
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/desktop_aura/x11_window_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698