Index: components/page_load_metrics/browser/metrics_web_contents_observer.h |
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.h b/components/page_load_metrics/browser/metrics_web_contents_observer.h |
index d58cfb003b594b0b803b1b3b7fa8befb7d2354ab..bcbff77c50e0b938daab920cae6c9822574e95a9 100644 |
--- a/components/page_load_metrics/browser/metrics_web_contents_observer.h |
+++ b/components/page_load_metrics/browser/metrics_web_contents_observer.h |
@@ -17,6 +17,7 @@ |
#include "content/public/browser/web_contents_observer.h" |
#include "content/public/browser/web_contents_user_data.h" |
#include "net/base/net_errors.h" |
+#include "third_party/WebKit/public/web/WebInputEvent.h" |
namespace content { |
class NavigationHandle; |
@@ -88,7 +89,10 @@ enum InternalErrorLoadEvent { |
ERR_NAVIGATION_SIGNALS_MULIPLE_ABORTED_LOADS, |
// Add values before this final count. |
- ERR_LAST_ENTRY |
+ ERR_LAST_ENTRY, |
+ |
+ // Receives user interaction before navigation start |
+ ERR_USER_INTERACTION_WITH_NO_RELEVANT_LOAD |
Bryan McQuade
2016/05/18 15:21:50
this needs to be before ERR_LAST_ENTRY
|
}; |
// This class serves as a functional interface to various chrome// features. |
@@ -123,6 +127,8 @@ class PageLoadTracker { |
void WebContentsHidden(); |
void WebContentsShown(); |
+ void UserInteraction(blink::WebInputEvent::Type type); |
+ |
// Returns true if the timing was successfully updated. |
bool UpdateTiming(const PageLoadTiming& timing, |
const PageLoadMetadata& metadata); |
@@ -198,6 +204,8 @@ class PageLoadTracker { |
base::TimeTicks foreground_time_; |
bool started_in_foreground_; |
+ base::TimeTicks user_interaction_time_; |
+ |
PageLoadTiming timing_; |
PageLoadMetadata metadata_; |
@@ -247,6 +255,7 @@ class MetricsWebContentsObserver |
void DidRedirectNavigation( |
content::NavigationHandle* navigation_handle) override; |
void NavigationStopped() override; |
+ void DidGetUserInteraction(const blink::WebInputEvent::Type type) override; |
void WasShown() override; |
void WasHidden() override; |
void RenderProcessGone(base::TerminationStatus status) override; |