OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ |
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 class WebInputEvent; | 26 class WebInputEvent; |
27 } // namespace blink | 27 } // namespace blink |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 class NavigationHandle; | 30 class NavigationHandle; |
31 } // namespace content | 31 } // namespace content |
32 | 32 |
33 namespace page_load_metrics { | 33 namespace page_load_metrics { |
34 | 34 |
35 class PageLoadMetricsEmbedderInterface; | 35 class PageLoadMetricsEmbedderInterface; |
36 class PageLoadMetricsObserver; | |
37 | 36 |
38 namespace internal { | 37 namespace internal { |
39 | 38 |
40 extern const char kErrorEvents[]; | 39 extern const char kErrorEvents[]; |
41 extern const char kAbortChainSizeReload[]; | 40 extern const char kAbortChainSizeReload[]; |
42 extern const char kAbortChainSizeForwardBack[]; | 41 extern const char kAbortChainSizeForwardBack[]; |
43 extern const char kAbortChainSizeNewNavigation[]; | 42 extern const char kAbortChainSizeNewNavigation[]; |
44 extern const char kAbortChainSizeNoCommit[]; | 43 extern const char kAbortChainSizeNoCommit[]; |
45 extern const char kAbortChainSizeSameURL[]; | 44 extern const char kAbortChainSizeSameURL[]; |
46 extern const char kPageLoadCompletedAfterAppBackground[]; | 45 extern const char kPageLoadCompletedAfterAppBackground[]; |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 void MediaStartedPlaying( | 263 void MediaStartedPlaying( |
265 const content::WebContentsObserver::MediaPlayerInfo& video_type, | 264 const content::WebContentsObserver::MediaPlayerInfo& video_type, |
266 bool is_in_main_frame); | 265 bool is_in_main_frame); |
267 | 266 |
268 // Invoked on navigations where a navigation delay was added by the | 267 // Invoked on navigations where a navigation delay was added by the |
269 // DelayNavigationThrottle. This is a temporary method that will be removed | 268 // DelayNavigationThrottle. This is a temporary method that will be removed |
270 // once the experiment is complete. | 269 // once the experiment is complete. |
271 void OnNavigationDelayComplete(base::TimeDelta scheduled_delay, | 270 void OnNavigationDelayComplete(base::TimeDelta scheduled_delay, |
272 base::TimeDelta actual_delay); | 271 base::TimeDelta actual_delay); |
273 | 272 |
| 273 // Informs the observers that the event corresponding to |event_key| has |
| 274 // occurred. |
| 275 void BroadcastEventToObservers(const void* const event_key); |
| 276 |
274 private: | 277 private: |
275 // This function converts a TimeTicks value taken in the browser process | 278 // This function converts a TimeTicks value taken in the browser process |
276 // to navigation_start_ if: | 279 // to navigation_start_ if: |
277 // - base::TimeTicks is not comparable across processes because the clock | 280 // - base::TimeTicks is not comparable across processes because the clock |
278 // is not system wide monotonic. | 281 // is not system wide monotonic. |
279 // - *event_time < navigation_start_ | 282 // - *event_time < navigation_start_ |
280 void ClampBrowserTimestampIfInterProcessTimeTickSkew( | 283 void ClampBrowserTimestampIfInterProcessTimeTickSkew( |
281 base::TimeTicks* event_time); | 284 base::TimeTicks* event_time); |
282 | 285 |
283 void UpdatePageEndInternal(PageEndReason page_end_reason, | 286 void UpdatePageEndInternal(PageEndReason page_end_reason, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 PageLoadMetricsUpdateDispatcher metrics_update_dispatcher_; | 373 PageLoadMetricsUpdateDispatcher metrics_update_dispatcher_; |
371 | 374 |
372 const ukm::SourceId source_id_; | 375 const ukm::SourceId source_id_; |
373 | 376 |
374 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); | 377 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); |
375 }; | 378 }; |
376 | 379 |
377 } // namespace page_load_metrics | 380 } // namespace page_load_metrics |
378 | 381 |
379 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ | 382 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ |
OLD | NEW |