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

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: cleanup 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..3faa0c71ce3b17020bb8fef9abaaf426b6ecdc19 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;
jkarlin 2017/05/08 13:00:41 using FrameTreeNodeId = int;
Bryan McQuade 2017/05/08 15:26:32 Done
+
virtual ~PageLoadMetricsObserver() {}
// The page load started, with the given navigation handle.
@@ -335,6 +337,21 @@ 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
jkarlin 2017/05/08 13:00:41 Need ||'s around the argument names.
Bryan McQuade 2017/05/08 15:26:32 Done
+ // 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_offset
+ // reports the offset of the subframe's navigation start from the main frame's
+ // navigation_start. The timings reported in child_timing are relative to the
+ // frame's navigation_start.
+ virtual void OnSubFrameTimingUpdate(FrameTreeNodeId child_frame_id,
+ base::TimeDelta navigation_start_offset,
+ 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