OLD | NEW |
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 "base/optional.h" | 9 #include "base/optional.h" |
10 #include "components/page_load_metrics/common/page_load_timing.h" | 10 #include "components/page_load_metrics/common/page_load_timing.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // Committed URL. If the page load did not commit, |committed_url| will be | 77 // Committed URL. If the page load did not commit, |committed_url| will be |
78 // empty. | 78 // empty. |
79 const GURL committed_url; | 79 const GURL committed_url; |
80 | 80 |
81 // Time from navigation start until commit. | 81 // Time from navigation start until commit. |
82 const base::Optional<base::TimeDelta> time_to_commit; | 82 const base::Optional<base::TimeDelta> time_to_commit; |
83 | 83 |
84 // The abort time and time to abort for this page load. If the page was not | 84 // The abort time and time to abort for this page load. If the page was not |
85 // aborted, |abort_type| will be |ABORT_NONE|. | 85 // aborted, |abort_type| will be |ABORT_NONE|. |
86 const UserAbortType abort_type; | 86 const UserAbortType abort_type; |
| 87 |
87 const base::Optional<base::TimeDelta> time_to_abort; | 88 const base::Optional<base::TimeDelta> time_to_abort; |
88 | 89 |
89 // Extra information supplied to the page load metrics system from the | 90 // Extra information supplied to the page load metrics system from the |
90 // renderer. | 91 // renderer. |
91 const PageLoadMetadata metadata; | 92 const PageLoadMetadata metadata; |
92 }; | 93 }; |
93 | 94 |
94 // Interface for PageLoadMetrics observers. All instances of this class are | 95 // Interface for PageLoadMetrics observers. All instances of this class are |
95 // owned by the PageLoadTracker tracking a page load. They will be deleted after | 96 // owned by the PageLoadTracker tracking a page load. They will be deleted after |
96 // calling OnComplete. | 97 // calling OnComplete. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 184 |
184 // Observer method to be invoked when there is a change in PageLoadMetadata's | 185 // Observer method to be invoked when there is a change in PageLoadMetadata's |
185 // behavior_flags. | 186 // behavior_flags. |
186 virtual void OnLoadingBehaviorObserved( | 187 virtual void OnLoadingBehaviorObserved( |
187 const page_load_metrics::PageLoadExtraInfo& extra_info) {} | 188 const page_load_metrics::PageLoadExtraInfo& extra_info) {} |
188 }; | 189 }; |
189 | 190 |
190 } // namespace page_load_metrics | 191 } // namespace page_load_metrics |
191 | 192 |
192 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_ | 193 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_ |
OLD | NEW |