OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSERVE
R_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSERVE
R_H_ |
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSERVE
R_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSERVE
R_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
(...skipping 12 matching lines...) Expand all Loading... |
23 static std::unique_ptr<AdsPageLoadMetricsObserver> CreateIfNeeded(); | 23 static std::unique_ptr<AdsPageLoadMetricsObserver> CreateIfNeeded(); |
24 | 24 |
25 AdsPageLoadMetricsObserver(); | 25 AdsPageLoadMetricsObserver(); |
26 ~AdsPageLoadMetricsObserver() override; | 26 ~AdsPageLoadMetricsObserver() override; |
27 | 27 |
28 // page_load_metrics::PageLoadMetricsObserver | 28 // page_load_metrics::PageLoadMetricsObserver |
29 ObservePolicy OnCommit(content::NavigationHandle* navigation_handle) override; | 29 ObservePolicy OnCommit(content::NavigationHandle* navigation_handle) override; |
30 ObservePolicy OnDidFinishSubFrameNavigation( | 30 ObservePolicy OnDidFinishSubFrameNavigation( |
31 content::NavigationHandle* navigation_handle) override; | 31 content::NavigationHandle* navigation_handle) override; |
32 ObservePolicy FlushMetricsOnAppEnterBackground( | 32 ObservePolicy FlushMetricsOnAppEnterBackground( |
33 const page_load_metrics::PageLoadTiming& timing, | 33 const page_load_metrics::mojom::PageLoadTiming& timing, |
34 const page_load_metrics::PageLoadExtraInfo& extra_info) override; | 34 const page_load_metrics::PageLoadExtraInfo& extra_info) override; |
35 void OnLoadedResource(const page_load_metrics::ExtraRequestCompleteInfo& | 35 void OnLoadedResource(const page_load_metrics::ExtraRequestCompleteInfo& |
36 extra_request_info) override; | 36 extra_request_info) override; |
37 void OnComplete(const page_load_metrics::PageLoadTiming& timing, | 37 void OnComplete(const page_load_metrics::mojom::PageLoadTiming& timing, |
38 const page_load_metrics::PageLoadExtraInfo& info) override; | 38 const page_load_metrics::PageLoadExtraInfo& info) override; |
39 | 39 |
40 private: | 40 private: |
41 using FrameTreeNodeId = int; | 41 using FrameTreeNodeId = int; |
42 | 42 |
43 struct AdFrameData { | 43 struct AdFrameData { |
44 explicit AdFrameData(FrameTreeNodeId frame_tree_node_id); | 44 explicit AdFrameData(FrameTreeNodeId frame_tree_node_id); |
45 size_t frame_bytes; | 45 size_t frame_bytes; |
46 size_t frame_bytes_uncached; | 46 size_t frame_bytes_uncached; |
47 const FrameTreeNodeId frame_tree_node_id; | 47 const FrameTreeNodeId frame_tree_node_id; |
(...skipping 27 matching lines...) Expand all Loading... |
75 | 75 |
76 size_t page_bytes_ = 0u; | 76 size_t page_bytes_ = 0u; |
77 size_t uncached_page_bytes_ = 0u; | 77 size_t uncached_page_bytes_ = 0u; |
78 int top_level_subframe_count_ = 0; | 78 int top_level_subframe_count_ = 0; |
79 int top_level_ad_frame_count_ = 0; | 79 int top_level_ad_frame_count_ = 0; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(AdsPageLoadMetricsObserver); | 81 DISALLOW_COPY_AND_ASSIGN(AdsPageLoadMetricsObserver); |
82 }; | 82 }; |
83 | 83 |
84 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSE
RVER_H_ | 84 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ADS_PAGE_LOAD_METRICS_OBSE
RVER_H_ |
OLD | NEW |