| 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 CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 bool started_in_foreground, | 112 bool started_in_foreground, |
| 113 UserInitiatedInfo user_initiated_info, | 113 UserInitiatedInfo user_initiated_info, |
| 114 const GURL& url, | 114 const GURL& url, |
| 115 const GURL& start_url, | 115 const GURL& start_url, |
| 116 bool did_commit, | 116 bool did_commit, |
| 117 PageEndReason page_end_reason, | 117 PageEndReason page_end_reason, |
| 118 UserInitiatedInfo page_end_user_initiated_info, | 118 UserInitiatedInfo page_end_user_initiated_info, |
| 119 const base::Optional<base::TimeDelta>& page_end_time, | 119 const base::Optional<base::TimeDelta>& page_end_time, |
| 120 const PageLoadMetadata& metadata); | 120 const PageLoadMetadata& metadata); |
| 121 | 121 |
| 122 // Simplified version of the constructor, intended for use in tests. |
| 123 static PageLoadExtraInfo CreateForTesting(const GURL& url, |
| 124 bool started_in_foreground); |
| 125 |
| 122 PageLoadExtraInfo(const PageLoadExtraInfo& other); | 126 PageLoadExtraInfo(const PageLoadExtraInfo& other); |
| 123 | 127 |
| 124 ~PageLoadExtraInfo(); | 128 ~PageLoadExtraInfo(); |
| 125 | 129 |
| 126 // The first time that the page was backgrounded since the navigation started. | 130 // The first time that the page was backgrounded since the navigation started. |
| 127 const base::Optional<base::TimeDelta> first_background_time; | 131 const base::Optional<base::TimeDelta> first_background_time; |
| 128 | 132 |
| 129 // The first time that the page was foregrounded since the navigation started. | 133 // The first time that the page was foregrounded since the navigation started. |
| 130 const base::Optional<base::TimeDelta> first_foreground_time; | 134 const base::Optional<base::TimeDelta> first_foreground_time; |
| 131 | 135 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 const FailedProvisionalLoadInfo& failed_provisional_load_info, | 354 const FailedProvisionalLoadInfo& failed_provisional_load_info, |
| 351 const PageLoadExtraInfo& extra_info) {} | 355 const PageLoadExtraInfo& extra_info) {} |
| 352 | 356 |
| 353 // Called whenever a request is loaded for this page load. | 357 // Called whenever a request is loaded for this page load. |
| 354 virtual void OnLoadedResource(const ExtraRequestInfo& extra_request_info) {} | 358 virtual void OnLoadedResource(const ExtraRequestInfo& extra_request_info) {} |
| 355 }; | 359 }; |
| 356 | 360 |
| 357 } // namespace page_load_metrics | 361 } // namespace page_load_metrics |
| 358 | 362 |
| 359 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ | 363 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ |
| OLD | NEW |