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

Unified Diff: ui/views/controls/slider.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/views/controls/slider.h ('k') | ui/views/controls/textfield/native_textfield_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/slider.cc
diff --git a/ui/views/controls/slider.cc b/ui/views/controls/slider.cc
index 99a0a9fed9e3ceb9bcaea905480cf73ce182b285..b6d07e19d64cfc5a844395442579d59e3e922996 100644
--- a/ui/views/controls/slider.cc
+++ b/ui/views/controls/slider.cc
@@ -291,19 +291,17 @@ bool Slider::OnKeyPressed(const ui::KeyEvent& event) {
return false;
}
-ui::EventResult Slider::OnGestureEvent(ui::GestureEvent* event) {
+void Slider::OnGestureEvent(ui::GestureEvent* event) {
if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN ||
event->type() == ui::ET_GESTURE_TAP_DOWN) {
PrepareForMove(event->location());
MoveButtonTo(event->location());
- return ui::ER_CONSUMED;
- } else
- if (event->type() == ui::ET_GESTURE_SCROLL_UPDATE ||
- event->type() == ui::ET_GESTURE_SCROLL_END) {
+ event->SetHandled();
+ } else if (event->type() == ui::ET_GESTURE_SCROLL_UPDATE ||
+ event->type() == ui::ET_GESTURE_SCROLL_END) {
MoveButtonTo(event->location());
- return ui::ER_CONSUMED;
+ event->SetHandled();
}
- return ui::ER_UNHANDLED;
}
void Slider::AnimationProgressed(const ui::Animation* animation) {
« no previous file with comments | « ui/views/controls/slider.h ('k') | ui/views/controls/textfield/native_textfield_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698