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

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

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.h
diff --git a/content/browser/web_contents/aura/overscroll_window_animation.h b/content/browser/web_contents/aura/overscroll_window_animation.h
index f19e5f8bcc71a87ad29859f747024c1de51b3f2c..e41275511fd84e0bea3d9254aab6acad1d010274 100644
--- a/content/browser/web_contents/aura/overscroll_window_animation.h
+++ b/content/browser/web_contents/aura/overscroll_window_animation.h
@@ -77,12 +77,19 @@ class CONTENT_EXPORT OverscrollWindowAnimation
// Returns true if we are currently animating.
bool is_active() const { return !!slide_window_; }
+ OverscrollSource overscroll_source() { return overscroll_source_; }
+
+ void SetOverscrollSourceForTesting(OverscrollSource source) {
+ overscroll_source_ = source;
+ }
+
// OverscrollControllerDelegate:
gfx::Rect GetVisibleBounds() const override;
bool OnOverscrollUpdate(float delta_x, float delta_y) override;
void OnOverscrollComplete(OverscrollMode overscroll_mode) override;
void OnOverscrollModeChange(OverscrollMode old_mode,
- OverscrollMode new_mode) override;
+ OverscrollMode new_mode,
+ OverscrollSource source) override;
private:
// Cancels the slide, animating the front and back window to their original
@@ -119,6 +126,11 @@ class CONTENT_EXPORT OverscrollWindowAnimation
// The current animation direction.
Direction direction_;
+ // OverscrollSource of the current overscroll gesture. Updated when the new
+ // overscroll gesture starts, before CreateFront/BackWindow callback is called
+ // on the delegate.
+ OverscrollSource overscroll_source_ = OverscrollSource::NONE;
+
// Indicates if the current slide has been cancelled. True while the cancel
// animation is in progress.
bool overscroll_cancelled_;

Powered by Google App Engine
This is Rietveld 408576698