 Chromium Code Reviews
 Chromium Code Reviews Issue 2859393002:
  Report page load timing information for child frames.  (Closed)
    
  
    Issue 2859393002:
  Report page load timing information for child frames.  (Closed) 
  | 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) {} |