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

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: 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..0c9c422f965a5fb3a467e7ff0368236a8aeb5838 100644
--- a/content/browser/web_contents/aura/overscroll_window_animation.h
+++ b/content/browser/web_contents/aura/overscroll_window_animation.h
@@ -7,6 +7,7 @@
#include <memory>
+#include "base/gtest_prod_util.h"
mohsen 2017/02/21 20:47:58 Is this needed?
mfomitchev 2017/02/23 02:59:42 Done.
#include "base/macros.h"
#include "content/browser/renderer_host/overscroll_controller_delegate.h"
#include "content/common/content_export.h"
@@ -77,12 +78,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 +127,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_ = OVERSCROLL_SOURCE_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