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

Unified Diff: components/page_load_metrics/browser/page_load_metrics_observer.h

Issue 1984173002: Log First User Interaction in Page Load Metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: components/page_load_metrics/browser/page_load_metrics_observer.h
diff --git a/components/page_load_metrics/browser/page_load_metrics_observer.h b/components/page_load_metrics/browser/page_load_metrics_observer.h
index b5e951f5cba965244f62b00df04e25c7acaaa9b6..86cfcd2ef66ce65d0c197624aec5eba6d8cf26e7 100644
--- a/components/page_load_metrics/browser/page_load_metrics_observer.h
+++ b/components/page_load_metrics/browser/page_load_metrics_observer.h
@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "components/page_load_metrics/common/page_load_timing.h"
#include "content/public/browser/navigation_handle.h"
+#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "url/gurl.h"
namespace page_load_metrics {
@@ -51,6 +52,7 @@ enum UserAbortType {
struct PageLoadExtraInfo {
PageLoadExtraInfo(base::TimeDelta first_background_time,
base::TimeDelta first_foreground_time,
+ base::TimeDelta first_user_interaction_time,
bool started_in_foreground,
const GURL& committed_url,
base::TimeDelta time_to_commit,
@@ -67,6 +69,10 @@ struct PageLoadExtraInfo {
// If the page has not been foregrounded this will be base::TimeDelta().
const base::TimeDelta first_foreground_time;
+ // The first time that the page was given a user input since the navigation
+ // started.
+ const base::TimeDelta first_user_interaction_time;
Bryan McQuade 2016/05/18 15:21:50 i'm actually not sure if this is a generally usefu
+
// True if the page load started in the foreground.
const bool started_in_foreground;
@@ -164,6 +170,10 @@ class PageLoadMetricsObserver {
const PageLoadExtraInfo& extra_info) {}
virtual void OnParseStop(const PageLoadTiming& timing,
const PageLoadExtraInfo& extra_info) {}
+
+ // OnUserInteraction is triggered when a new user input is passed in to
+ // web_contents
tdresser 2016/05/17 13:24:53 nit:missing period.
tdresser 2016/05/17 13:24:53 It worries me a bit that these comments don't make
Bryan McQuade 2016/05/18 15:21:50 yeah, i agree - it seems the WCO hook we are overr
+ virtual void OnUserInteraction(blink::WebInputEvent::Type type) {}
};
} // namespace page_load_metrics

Powered by Google App Engine
This is Rietveld 408576698