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

Unified Diff: ui/views/controls/scrollbar/base_scroll_bar.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/views/controls/scrollbar/base_scroll_bar.h ('k') | ui/views/controls/scrollbar/native_scroll_bar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/scrollbar/base_scroll_bar.cc
diff --git a/ui/views/controls/scrollbar/base_scroll_bar.cc b/ui/views/controls/scrollbar/base_scroll_bar.cc
index 2fb30bb684e52a1804462805d9d8ad6a8b9412f5..bbf5e3a43ba074911e17b76f533ef15f4a6cb43c 100644
--- a/ui/views/controls/scrollbar/base_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/base_scroll_bar.cc
@@ -167,7 +167,7 @@ bool BaseScrollBar::OnKeyPressed(const ui::KeyEvent& event) {
return false;
}
-ui::GestureStatus BaseScrollBar::OnGestureEvent(const ui::GestureEvent& event) {
+ui::EventResult BaseScrollBar::OnGestureEvent(const ui::GestureEvent& event) {
// If a fling is in progress, then stop the fling for any incoming gesture
// event (except for the GESTURE_END event that is generated at the end of the
// fling).
@@ -179,13 +179,13 @@ ui::GestureStatus BaseScrollBar::OnGestureEvent(const ui::GestureEvent& event) {
if (event.type() == ui::ET_GESTURE_TAP_DOWN) {
ProcessPressEvent(event);
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
}
if (event.type() == ui::ET_GESTURE_LONG_PRESS) {
// For a long-press, the repeater started in tap-down should continue. So
// return early.
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
}
ResetState();
@@ -193,17 +193,17 @@ ui::GestureStatus BaseScrollBar::OnGestureEvent(const ui::GestureEvent& event) {
if (event.type() == ui::ET_GESTURE_TAP) {
// TAP_DOWN would have already scrolled some amount. So scrolling again on
// TAP is not necessary.
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
}
if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN ||
event.type() == ui::ET_GESTURE_SCROLL_END)
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
if (event.type() == ui::ET_GESTURE_SCROLL_UPDATE) {
ScrollByContentsOffset(IsHorizontal() ? event.details().scroll_x() :
event.details().scroll_y());
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
}
if (event.type() == ui::ET_SCROLL_FLING_START) {
@@ -211,10 +211,10 @@ ui::GestureStatus BaseScrollBar::OnGestureEvent(const ui::GestureEvent& event) {
scroll_animator_.reset(new ScrollAnimator(this));
scroll_animator_->Start(IsHorizontal() ? event.details().velocity_x() : 0.f,
IsHorizontal() ? 0.f : event.details().velocity_y());
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
}
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
}
bool BaseScrollBar::OnMouseWheel(const ui::MouseWheelEvent& event) {
« no previous file with comments | « ui/views/controls/scrollbar/base_scroll_bar.h ('k') | ui/views/controls/scrollbar/native_scroll_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698