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

Unified Diff: ash/wm/workspace/workspace_cycler.cc

Issue 11568006: events: Update scroll and touch handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nit 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 | « ash/wm/workspace/workspace_cycler.h ('k') | chrome/browser/ui/views/ash/tab_scrubber.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_cycler.cc
diff --git a/ash/wm/workspace/workspace_cycler.cc b/ash/wm/workspace/workspace_cycler.cc
index 3e6878b5da5b1c205f9b3e5cfa33a32948e4c1e3..1080bb0830964fc2df907c9d2a08edd5590372b7 100644
--- a/ash/wm/workspace/workspace_cycler.cc
+++ b/ash/wm/workspace/workspace_cycler.cc
@@ -39,16 +39,16 @@ WorkspaceCycler::~WorkspaceCycler() {
ash::Shell::GetInstance()->RemovePreTargetHandler(this);
}
-ui::EventResult WorkspaceCycler::OnScrollEvent(ui::ScrollEvent* event) {
+void WorkspaceCycler::OnScrollEvent(ui::ScrollEvent* event) {
if (event->finger_count() != 3 ||
event->type() != ui::ET_SCROLL) {
scrubbing_ = false;
- return ui::ER_UNHANDLED;
+ return;
}
if (!IsScrubbingEnabled()) {
scrubbing_ = false;
- return ui::ER_UNHANDLED;
+ return;
}
if (!scrubbing_) {
@@ -73,7 +73,8 @@ ui::EventResult WorkspaceCycler::OnScrollEvent(ui::ScrollEvent* event) {
scroll_x_ = 0;
scroll_y_ = 0;
- return ui::ER_HANDLED;
+ event->SetHandled();
+ return;
}
if (std::abs(scroll_x_) > kWorkspaceStepSize) {
@@ -86,7 +87,6 @@ ui::EventResult WorkspaceCycler::OnScrollEvent(ui::ScrollEvent* event) {
}
// The active workspace was not changed, do not consume the event.
- return ui::ER_UNHANDLED;
}
} // namespace internal
« no previous file with comments | « ash/wm/workspace/workspace_cycler.h ('k') | chrome/browser/ui/views/ash/tab_scrubber.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698