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

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

Issue 1975963003: Improved and generalized page load metric immediate event logging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « components/page_load_metrics/browser/metrics_web_contents_observer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 const PageLoadExtraInfo& extra_info) {} 135 const PageLoadExtraInfo& extra_info) {}
136 136
137 // 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
138 // load. This will happen some time after commit. The PageLoadTiming struct 138 // load. This will happen some time after commit. The PageLoadTiming struct
139 // contains timing data and the PageLoadExtraInfo struct contains other useful 139 // contains timing data and the PageLoadExtraInfo struct contains other useful
140 // 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
141 // receive any timing information, |timing.IsEmpty()| will be true. 141 // receive any timing information, |timing.IsEmpty()| will be true.
142 // After this call, the object will be deleted. 142 // After this call, the object will be deleted.
143 virtual void OnComplete(const PageLoadTiming& timing, 143 virtual void OnComplete(const PageLoadTiming& timing,
144 const PageLoadExtraInfo& extra_info) {} 144 const PageLoadExtraInfo& extra_info) {}
145
146 // The following methods are invoked at most once, when the timing for the
147 // associated event first becomes available.
148 virtual void OnDomContentLoadedEventStart(
149 const PageLoadTiming& timing,
150 const PageLoadExtraInfo& extra_info) {}
151 virtual void OnLoadEventStart(const PageLoadTiming& timing,
152 const PageLoadExtraInfo& extra_info) {}
153 virtual void OnFirstLayout(const PageLoadTiming& timing,
154 const PageLoadExtraInfo& extra_info) {}
155 virtual void OnFirstPaint(const PageLoadTiming& timing,
156 const PageLoadExtraInfo& extra_info) {}
157 virtual void OnFirstTextPaint(const PageLoadTiming& timing,
158 const PageLoadExtraInfo& extra_info) {}
159 virtual void OnFirstImagePaint(const PageLoadTiming& timing,
160 const PageLoadExtraInfo& extra_info) {}
161 virtual void OnFirstContentfulPaint(const PageLoadTiming& timing,
162 const PageLoadExtraInfo& extra_info) {}
163 virtual void OnParseStart(const PageLoadTiming& timing,
164 const PageLoadExtraInfo& extra_info) {}
165 virtual void OnParseStop(const PageLoadTiming& timing,
166 const PageLoadExtraInfo& extra_info) {}
145 }; 167 };
146 168
147 } // namespace page_load_metrics 169 } // namespace page_load_metrics
148 170
149 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_ 171 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_
OLDNEW
« no previous file with comments | « components/page_load_metrics/browser/metrics_web_contents_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698