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

Unified Diff: chrome/browser/ui/views/tabs/tab.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 | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_strip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 7e39d6692139142c8a6e172629f7dbe4a91b7a60..0cf26ba6ff3089cba93b9198f9a5a6f01b0a984e 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -357,11 +357,11 @@ class Tab::TabCloseButton : public views::ImageButton {
CustomButton::OnMouseReleased(event);
}
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
// Consume all gesture events here so that the parent (Tab) does not
// start consuming gestures.
ImageButton::OnGestureEvent(event);
- return ui::ER_CONSUMED;
+ event->SetHandled();
}
private:
@@ -936,14 +936,16 @@ void Tab::OnMouseExited(const ui::MouseEvent& event) {
hover_controller_.Hide();
}
-ui::EventResult Tab::OnGestureEvent(ui::GestureEvent* event) {
- if (!controller())
- return ui::ER_CONSUMED;
+void Tab::OnGestureEvent(ui::GestureEvent* event) {
+ if (!controller()) {
+ event->SetHandled();
+ return;
+ }
switch (event->type()) {
case ui::ET_GESTURE_BEGIN: {
if (event->details().touch_points() != 1)
- return ui::ER_UNHANDLED;
+ return;
TabStripSelectionModel original_selection;
original_selection.Copy(controller()->GetSelectionModel());
@@ -966,7 +968,7 @@ ui::EventResult Tab::OnGestureEvent(ui::GestureEvent* event) {
default:
break;
}
- return ui::ER_CONSUMED;
+ event->SetHandled();
}
void Tab::GetAccessibleState(ui::AccessibleViewState* state) {
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698