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

Unified Diff: ui/app_list/app_list_item_view.cc

Issue 11280290: events: Change gesture-event handler in EventHandler to not return any values. (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
« no previous file with comments | « ui/app_list/app_list_item_view.h ('k') | ui/app_list/contents_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_item_view.cc
diff --git a/ui/app_list/app_list_item_view.cc b/ui/app_list/app_list_item_view.cc
index 07d35adaba87f9ae262ed3638a160f81b269de85..0e8eb2669011bb8837673b5e9c01ef70b9c39e72 100644
--- a/ui/app_list/app_list_item_view.cc
+++ b/ui/app_list/app_list_item_view.cc
@@ -313,18 +313,18 @@ bool AppListItemView::OnMouseDragged(const ui::MouseEvent& event) {
return true;
}
-ui::EventResult AppListItemView::OnGestureEvent(ui::GestureEvent* event) {
+void AppListItemView::OnGestureEvent(ui::GestureEvent* event) {
switch (event->type()) {
case ui::ET_GESTURE_SCROLL_BEGIN:
if (touch_dragging_) {
apps_grid_view_->InitiateDrag(this, AppsGridView::TOUCH, *event);
- return ui::ER_CONSUMED;
+ event->SetHandled();
}
break;
case ui::ET_GESTURE_SCROLL_UPDATE:
if (touch_dragging_) {
apps_grid_view_->UpdateDrag(this, AppsGridView::TOUCH, *event);
- return ui::ER_CONSUMED;
+ event->SetHandled();
}
break;
case ui::ET_GESTURE_SCROLL_END:
@@ -332,13 +332,14 @@ ui::EventResult AppListItemView::OnGestureEvent(ui::GestureEvent* event) {
if (touch_dragging_) {
SetTouchDragging(false);
apps_grid_view_->EndDrag(false);
- return ui::ER_CONSUMED;
+ event->SetHandled();
}
break;
case ui::ET_GESTURE_LONG_PRESS:
if (!apps_grid_view_->has_dragged_view())
SetTouchDragging(true);
- return ui::ER_CONSUMED;
+ event->SetHandled();
+ break;
case ui::ET_GESTURE_END:
if (touch_dragging_) {
SetTouchDragging(false);
@@ -351,7 +352,8 @@ ui::EventResult AppListItemView::OnGestureEvent(ui::GestureEvent* event) {
default:
break;
}
- return CustomButton::OnGestureEvent(event);
+ if (!event->handled())
+ CustomButton::OnGestureEvent(event);
}
} // namespace app_list
« no previous file with comments | « ui/app_list/app_list_item_view.h ('k') | ui/app_list/contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698