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

Unified Diff: content/browser/web_contents/aura/overscroll_window_animation.cc

Issue 2698673006: Add User Actions and adding more details to UMA metrics for overscroll navigation (Closed)
Patch Set: Trailing period Created 3 years, 10 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
Index: content/browser/web_contents/aura/overscroll_window_animation.cc
diff --git a/content/browser/web_contents/aura/overscroll_window_animation.cc b/content/browser/web_contents/aura/overscroll_window_animation.cc
index 8ed3bf04d48809b9a0e58c310c003f5c1099839c..e50a84ff828d27b91bf26918252aa1c32e48bbcd 100644
--- a/content/browser/web_contents/aura/overscroll_window_animation.cc
+++ b/content/browser/web_contents/aura/overscroll_window_animation.cc
@@ -81,12 +81,14 @@ void OverscrollWindowAnimation::OnImplicitAnimationsCompleted() {
} else {
delegate_->OnOverscrollCompleted(std::move(slide_window_));
}
+ overscroll_source_ = OverscrollSource::NONE;
direction_ = SLIDE_NONE;
}
void OverscrollWindowAnimation::OnOverscrollModeChange(
OverscrollMode old_mode,
- OverscrollMode new_mode) {
+ OverscrollMode new_mode,
+ OverscrollSource source) {
DCHECK_NE(old_mode, new_mode);
Direction new_direction = GetDirectionForMode(new_mode);
if (new_direction == SLIDE_NONE) {
@@ -111,12 +113,16 @@ void OverscrollWindowAnimation::OnOverscrollModeChange(
: -slide_window_bounds.width() / 2,
0);
}
+
+ DCHECK_EQ(overscroll_source_, OverscrollSource::NONE);
+ overscroll_source_ = source;
slide_window_ = new_direction == SLIDE_FRONT
? delegate_->CreateFrontWindow(slide_window_bounds)
: delegate_->CreateBackWindow(slide_window_bounds);
if (!slide_window_) {
// Cannot navigate, do not start an overscroll gesture.
direction_ = SLIDE_NONE;
+ overscroll_source_ = OverscrollSource::NONE;
return;
}
overscroll_cancelled_ = false;

Powered by Google App Engine
This is Rietveld 408576698