| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 content::RenderViewHost* new_host) override; | 68 content::RenderViewHost* new_host) override; |
| 69 void MediaStartedPlaying( | 69 void MediaStartedPlaying( |
| 70 const content::WebContentsObserver::MediaPlayerInfo& video_type, | 70 const content::WebContentsObserver::MediaPlayerInfo& video_type, |
| 71 const content::WebContentsObserver::MediaPlayerId& id) override; | 71 const content::WebContentsObserver::MediaPlayerId& id) override; |
| 72 | 72 |
| 73 // These methods are forwarded from the MetricsNavigationThrottle. | 73 // These methods are forwarded from the MetricsNavigationThrottle. |
| 74 void WillStartNavigationRequest(content::NavigationHandle* navigation_handle); | 74 void WillStartNavigationRequest(content::NavigationHandle* navigation_handle); |
| 75 void WillProcessNavigationResponse( | 75 void WillProcessNavigationResponse( |
| 76 content::NavigationHandle* navigation_handle); | 76 content::NavigationHandle* navigation_handle); |
| 77 | 77 |
| 78 // A resource request started on the IO thread. This method is invoked on |
| 79 // the UI thread. |
| 80 void OnRequestStarted(const content::GlobalRequestID& request_id, |
| 81 content::ResourceType resource_type, |
| 82 base::TimeTicks creation_time); |
| 83 |
| 78 // A resource request completed on the IO thread. This method is invoked on | 84 // A resource request completed on the IO thread. This method is invoked on |
| 79 // the UI thread. | 85 // the UI thread. |
| 80 void OnRequestComplete( | 86 void OnRequestComplete( |
| 81 const content::GlobalRequestID& request_id, | 87 const content::GlobalRequestID& request_id, |
| 82 content::ResourceType resource_type, | 88 content::ResourceType resource_type, |
| 83 bool was_cached, | 89 bool was_cached, |
| 84 std::unique_ptr<data_reduction_proxy::DataReductionProxyData> | 90 std::unique_ptr<data_reduction_proxy::DataReductionProxyData> |
| 85 data_reduction_proxy_data, | 91 data_reduction_proxy_data, |
| 86 int64_t raw_body_bytes, | 92 int64_t raw_body_bytes, |
| 87 int64_t original_content_length, | 93 int64_t original_content_length, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 181 |
| 176 // Has the MWCO observed at least one navigation? | 182 // Has the MWCO observed at least one navigation? |
| 177 bool has_navigated_; | 183 bool has_navigated_; |
| 178 | 184 |
| 179 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); | 185 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); |
| 180 }; | 186 }; |
| 181 | 187 |
| 182 } // namespace page_load_metrics | 188 } // namespace page_load_metrics |
| 183 | 189 |
| 184 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 190 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |