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

Unified Diff: ui/views/controls/menu/menu_controller.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/menu/menu_controller.h ('k') | ui/views/controls/menu/menu_host_root_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_controller.cc
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index bf45d9a19d40a5b21aa1783985de719bcf0285a0..d4adac95d74840eefb48a8c6440026706b4d4782 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -521,17 +521,17 @@ bool MenuController::OnMouseWheel(SubmenuView* source,
}
#endif
-ui::GestureStatus MenuController::OnGestureEvent(
+ui::EventResult MenuController::OnGestureEvent(
SubmenuView* source,
const ui::GestureEvent& event) {
MenuPart part = GetMenuPart(source, event.location());
if (event.type() == ui::ET_GESTURE_TAP_DOWN) {
SetSelectionOnPointerDown(source, event);
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
} else if (event.type() == ui::ET_GESTURE_LONG_PRESS) {
if (part.type == MenuPart::MENU_ITEM && part.menu) {
if (ShowContextMenu(part.menu, source, event))
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
}
} else if (event.type() == ui::ET_GESTURE_TAP) {
if (!part.is_scroll() && part.menu &&
@@ -540,16 +540,16 @@ ui::GestureStatus MenuController::OnGestureEvent(
part.menu, event)) {
Accept(part.menu, 0);
}
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
} else if (part.type == MenuPart::MENU_ITEM) {
// User either tapped on empty space, or a menu that has children.
SetSelection(part.menu ? part.menu : state_.item,
SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
}
}
if (!part.submenu)
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
return part.submenu->OnGestureEvent(event);
}
« no previous file with comments | « ui/views/controls/menu/menu_controller.h ('k') | ui/views/controls/menu/menu_host_root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698