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

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

Issue 2859393002: Report page load timing information for child frames. (Closed)
Patch Set: add browsertests Created 3 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: chrome/browser/page_load_metrics/page_load_metrics_observer.h
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_observer.h b/chrome/browser/page_load_metrics/page_load_metrics_observer.h
index c84787a443019d30ad4dcad76c606d1878f092f1..c828d9b5127d1cfa3143d0374f5a74d71477714d 100644
--- a/chrome/browser/page_load_metrics/page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/page_load_metrics_observer.h
@@ -270,6 +270,8 @@ class PageLoadMetricsObserver {
STOP_OBSERVING,
};
+ typedef int FrameTreeNodeId;
+
virtual ~PageLoadMetricsObserver() {}
// The page load started, with the given navigation handle.
@@ -335,6 +337,22 @@ class PageLoadMetricsObserver {
// loading-dev@chromium.org if you intend to override this method.
virtual void OnTimingUpdate(const PageLoadTiming& timing,
const PageLoadExtraInfo& extra_info) {}
+
+ // OnSubFrameTimingUpdate is triggered when an updated PageLoadTiming or
+ // PageLoadMetadata is available for a child frame of the current page
+ // load. The FrameTreeNodeId identifies the frame that navigation_start,
+ // child_timing, and child_metadata are associated with. The PageLoadExtraInfo
+ // contains the extra info associated with the page. navigation_start reports
+ // the time delta from the main frame navigation_start. The timings reported
+ // in child_timing are relative to the frame's navigation_start, so should be
+ // offset by navigation_start in order to get their timing relative to the
+ // main frame's navigation start.
+ virtual void OnSubFrameTimingUpdate(FrameTreeNodeId child_frame_id,
+ base::TimeDelta navigation_start,
+ const PageLoadTiming& child_timing,
+ const PageLoadMetadata& child_metadata,
+ const PageLoadExtraInfo& extra_info) {}
+
// OnUserInput is triggered when a new user input is passed in to
// web_contents. Contains a TimeDelta from navigation start.
virtual void OnUserInput(const blink::WebInputEvent& event) {}

Powered by Google App Engine
This is Rietveld 408576698