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

Unified Diff: content/browser/renderer_host/overscroll_controller.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/renderer_host/overscroll_controller.h
diff --git a/content/browser/renderer_host/overscroll_controller.h b/content/browser/renderer_host/overscroll_controller.h
index 62eca7e6deb54527fa935c1ad0b75822e61fb017..ff87a5ca67063076c64021f9cacc57d20cb482e8 100644
--- a/content/browser/renderer_host/overscroll_controller.h
+++ b/content/browser/renderer_host/overscroll_controller.h
@@ -25,6 +25,13 @@ enum OverscrollMode {
OVERSCROLL_EAST
};
+// Indicates the source device that was used to trigger the overscroll gesture.
+enum OverscrollSource {
mohsen 2017/02/21 20:47:58 I believe it's preferred to use "enum class". Then
mfomitchev 2017/02/23 02:59:42 Done.
+ OVERSCROLL_SOURCE_NONE,
+ OVERSCROLL_TOUCHPAD,
+ OVERSCROLL_TOUCHSCREEN,
+};
+
// When a page is scrolled beyond the scrollable region, it will trigger an
// overscroll gesture. This controller receives the events that are dispatched
// to the renderer, and the ACKs of events, and updates the overscroll gesture
@@ -94,9 +101,11 @@ class OverscrollController {
// Completes the desired action from the current gesture.
void CompleteAction();
- // Sets the overscroll mode (and triggers callback in the delegate when
- // appropriate).
- void SetOverscrollMode(OverscrollMode new_mode);
+ // Sets the overscroll mode and triggers callback in the delegate when
+ // appropriate. When a new overscroll is started (i.e. when |new_mode| is not
+ // equal to OVERSCROLL_NONE), |source| will be set to the device that
+ // triggered the overscroll gesture.
+ void SetOverscrollMode(OverscrollMode new_mode, OverscrollSource source);
// Whether this event should be processed or not handled by the controller.
bool ShouldProcessEvent(const blink::WebInputEvent& event);

Powered by Google App Engine
This is Rietveld 408576698