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

Unified Diff: athena/wm/bezel_controller.cc

Issue 574113004: [Athena] Fix switching activities by swiping from the right bezel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_split
Patch Set: Created 6 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 | « no previous file | athena/wm/split_view_controller.cc » ('j') | athena/wm/split_view_controller.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/bezel_controller.cc
diff --git a/athena/wm/bezel_controller.cc b/athena/wm/bezel_controller.cc
index a4e815602e7b32ecee1667e88caf0962f71199d6..fbf9f92fc4eda5e509aa5ce6e5628cdec60c079f 100644
--- a/athena/wm/bezel_controller.cc
+++ b/athena/wm/bezel_controller.cc
@@ -68,15 +68,21 @@ void BezelController::SetState(BezelController::State state,
if (!left_right_delegate_ || state == state_)
return;
- if (state == BEZEL_SCROLLING_TWO_FINGERS)
- left_right_delegate_->ScrollBegin(scroll_bezel_, scroll_delta);
- else if (state_ == BEZEL_SCROLLING_TWO_FINGERS)
- left_right_delegate_->ScrollEnd();
+ State old_state = state_;
state_ = state;
+
if (state == NONE) {
scroll_bezel_ = BEZEL_NONE;
scroll_target_ = NULL;
}
+
+ if (state == BEZEL_SCROLLING_TWO_FINGERS) {
+ left_right_delegate_->ScrollBegin(scroll_bezel_, scroll_delta);
+ } else if (old_state == BEZEL_SCROLLING_TWO_FINGERS) {
+ // If ScrollEnd() hides |scroll_target_|, ET_GESTURE_END is dispatched
+ // and we get a reentrant call to SetState().
+ left_right_delegate_->ScrollEnd();
+ }
}
// Only implemented for LEFT and RIGHT bezels ATM.
« no previous file with comments | « no previous file | athena/wm/split_view_controller.cc » ('j') | athena/wm/split_view_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698