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

Unified Diff: ui/app_list/contents_view.cc

Issue 10912063: events: Get rid of GestureStatus in favour of EventResult. (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 | « ui/app_list/contents_view.h ('k') | ui/aura/demo/demo_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/contents_view.cc
diff --git a/ui/app_list/contents_view.cc b/ui/app_list/contents_view.cc
index a213526ef12dbc61de3fb1f45ba18600fd430ea8..c254de5ef51c365da72bcecd57b0c13e26b5e051 100644
--- a/ui/app_list/contents_view.cc
+++ b/ui/app_list/contents_view.cc
@@ -191,25 +191,25 @@ void ContentsView::Layout() {
views::ViewModelUtils::SetViewBoundsToIdealBounds(*view_model_);
}
-ui::GestureStatus ContentsView::OnGestureEvent(
+ui::EventResult ContentsView::OnGestureEvent(
const ui::GestureEvent& event) {
if (show_state_ != SHOW_APPS)
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
switch (event.type()) {
case ui::ET_GESTURE_SCROLL_BEGIN:
pagination_model_->StartScroll();
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
case ui::ET_GESTURE_SCROLL_UPDATE:
// event.details.scroll_x() > 0 means moving contents to right. That is,
// transitioning to previous page.
pagination_model_->UpdateScroll(
event.details().scroll_x() / GetContentsBounds().width());
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
case ui::ET_GESTURE_SCROLL_END:
pagination_model_->EndScroll(pagination_model_->
transition().progress < kFinishTransitionThreshold);
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
case ui::ET_SCROLL_FLING_START: {
pagination_model_->EndScroll(true);
if (fabs(event.details().velocity_x()) > kMinHorizVelocityToSwitchPage) {
@@ -217,13 +217,13 @@ ui::GestureStatus ContentsView::OnGestureEvent(
event.details().velocity_x() < 0 ? 1 : -1,
true);
}
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
}
default:
break;
}
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
}
bool ContentsView::OnKeyPressed(const ui::KeyEvent& event) {
« no previous file with comments | « ui/app_list/contents_view.h ('k') | ui/aura/demo/demo_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698