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

Side by Side Diff: components/page_load_metrics/browser/page_load_metrics_observer.h

Issue 1953673003: Log an immediate variant of FirstContentfulPaint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add tests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_ 5 #ifndef COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_
6 #define COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_ 6 #define COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/page_load_metrics/common/page_load_timing.h" 9 #include "components/page_load_metrics/common/page_load_timing.h"
10 #include "content/public/browser/navigation_handle.h" 10 #include "content/public/browser/navigation_handle.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // reference to it. 119 // reference to it.
120 // Note that this does not get called for same page navigations. 120 // Note that this does not get called for same page navigations.
121 virtual void OnCommit(content::NavigationHandle* navigation_handle) {} 121 virtual void OnCommit(content::NavigationHandle* navigation_handle) {}
122 122
123 // OnFailedProvisionalLoad is triggered when a provisional load failed and did 123 // OnFailedProvisionalLoad is triggered when a provisional load failed and did
124 // not commit. Note that provisional loads that result in downloads or 204s 124 // not commit. Note that provisional loads that result in downloads or 204s
125 // are aborted by the system, and thus considered failed provisional loads. 125 // are aborted by the system, and thus considered failed provisional loads.
126 virtual void OnFailedProvisionalLoad( 126 virtual void OnFailedProvisionalLoad(
127 content::NavigationHandle* navigation_handle) {} 127 content::NavigationHandle* navigation_handle) {}
128 128
129 // OnTimingUpdate is triggered when an updated PageLoadTiming is
130 // available. This method may be called multiple times over the course of the
131 // page load. Note that this is currently an experimental API which may be
132 // removed in the future. Please email loading-dev@chromium.org if you intend
133 // to override this method.
134 virtual void OnTimingUpdate(const PageLoadTiming& timing,
135 const PageLoadExtraInfo& extra_info) {}
136
129 // OnComplete is triggered when we are ready to record metrics for this page 137 // OnComplete is triggered when we are ready to record metrics for this page
130 // load. This will happen some time after commit. The PageLoadTiming struct 138 // load. This will happen some time after commit. The PageLoadTiming struct
131 // contains timing data and the PageLoadExtraInfo struct contains other useful 139 // contains timing data and the PageLoadExtraInfo struct contains other useful
132 // data collected over the course of the page load. If the load did not 140 // data collected over the course of the page load. If the load did not
133 // receive any timing information, |timing.IsEmpty()| will be true. 141 // receive any timing information, |timing.IsEmpty()| will be true.
134 // After this call, the object will be deleted. 142 // After this call, the object will be deleted.
135 virtual void OnComplete(const PageLoadTiming& timing, 143 virtual void OnComplete(const PageLoadTiming& timing,
136 const PageLoadExtraInfo& extra_info) {} 144 const PageLoadExtraInfo& extra_info) {}
137 }; 145 };
138 146
139 } // namespace page_load_metrics 147 } // namespace page_load_metrics
140 148
141 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_ 149 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698