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

Unified Diff: ui/views/controls/link.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/link.h ('k') | ui/views/controls/menu/menu_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/link.cc
diff --git a/ui/views/controls/link.cc b/ui/views/controls/link.cc
index 4eea3cf48f7876a7c65100fa73be2e2156d53b06..04c83ac3af628bce83147af1514656a4ca576ae8 100644
--- a/ui/views/controls/link.cc
+++ b/ui/views/controls/link.cc
@@ -122,9 +122,9 @@ void Link::GetAccessibleState(ui::AccessibleViewState* state) {
state->role = ui::AccessibilityTypes::ROLE_LINK;
}
-ui::EventResult Link::OnGestureEvent(ui::GestureEvent* event) {
+void Link::OnGestureEvent(ui::GestureEvent* event) {
if (!enabled())
- return ui::ER_UNHANDLED;
+ return;
if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
SetPressed(true);
@@ -134,9 +134,9 @@ ui::EventResult Link::OnGestureEvent(ui::GestureEvent* event) {
listener_->LinkClicked(this, event->flags());
} else {
SetPressed(false);
- return ui::ER_UNHANDLED;
+ return;
}
- return ui::ER_CONSUMED;
+ event->SetHandled();
}
void Link::SetFont(const gfx::Font& font) {
« no previous file with comments | « ui/views/controls/link.h ('k') | ui/views/controls/menu/menu_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698