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_METRICS_WEB_CONTENTS_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 const content::WebContentsObserver::MediaPlayerInfo& video_type, | 69 const content::WebContentsObserver::MediaPlayerInfo& video_type, |
70 const content::WebContentsObserver::MediaPlayerId& id) override; | 70 const content::WebContentsObserver::MediaPlayerId& id) override; |
71 | 71 |
72 // These methods are forwarded from the MetricsNavigationThrottle. | 72 // These methods are forwarded from the MetricsNavigationThrottle. |
73 void WillStartNavigationRequest(content::NavigationHandle* navigation_handle); | 73 void WillStartNavigationRequest(content::NavigationHandle* navigation_handle); |
74 void WillProcessNavigationResponse( | 74 void WillProcessNavigationResponse( |
75 content::NavigationHandle* navigation_handle); | 75 content::NavigationHandle* navigation_handle); |
76 | 76 |
77 // A resource request completed on the IO thread. This method is invoked on | 77 // A resource request completed on the IO thread. This method is invoked on |
78 // the UI thread. | 78 // the UI thread. |
79 void OnRequestComplete(const content::GlobalRequestID& request_id, | 79 void OnRequestComplete(const GURL& url, |
| 80 int frame_tree_node_id, |
| 81 const content::GlobalRequestID& request_id, |
80 content::ResourceType resource_type, | 82 content::ResourceType resource_type, |
81 bool was_cached, | 83 bool was_cached, |
82 bool used_data_reduction_proxy, | 84 bool used_data_reduction_proxy, |
83 int64_t raw_body_bytes, | 85 int64_t raw_body_bytes, |
84 int64_t original_content_length, | 86 int64_t original_content_length, |
85 base::TimeTicks creation_time); | 87 base::TimeTicks creation_time); |
86 | 88 |
87 // Flush any buffered metrics, as part of the metrics subsystem persisting | 89 // Flush any buffered metrics, as part of the metrics subsystem persisting |
88 // metrics as the application goes into the background. The application may be | 90 // metrics as the application goes into the background. The application may be |
89 // killed at any time after this method is invoked without further | 91 // killed at any time after this method is invoked without further |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 167 |
166 // Has the MWCO observed at least one navigation? | 168 // Has the MWCO observed at least one navigation? |
167 bool has_navigated_; | 169 bool has_navigated_; |
168 | 170 |
169 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); | 171 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); |
170 }; | 172 }; |
171 | 173 |
172 } // namespace page_load_metrics | 174 } // namespace page_load_metrics |
173 | 175 |
174 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 176 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |