| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 content::RenderViewHost* new_host) override; | 67 content::RenderViewHost* new_host) override; |
| 68 void MediaStartedPlaying( | 68 void MediaStartedPlaying( |
| 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 started on the IO thread. This method is invoked on |
| 78 // the UI thread. |
| 79 void OnRequestStarted(const content::GlobalRequestID& request_id, |
| 80 content::ResourceType resource_type, |
| 81 base::TimeTicks creation_time); |
| 82 |
| 77 // A resource request completed on the IO thread. This method is invoked on | 83 // A resource request completed on the IO thread. This method is invoked on |
| 78 // the UI thread. | 84 // the UI thread. |
| 79 void OnRequestComplete(const content::GlobalRequestID& request_id, | 85 void OnRequestComplete(const content::GlobalRequestID& request_id, |
| 80 content::ResourceType resource_type, | 86 content::ResourceType resource_type, |
| 81 bool was_cached, | 87 bool was_cached, |
| 82 bool used_data_reduction_proxy, | 88 bool used_data_reduction_proxy, |
| 83 int64_t raw_body_bytes, | 89 int64_t raw_body_bytes, |
| 84 int64_t original_content_length, | 90 int64_t original_content_length, |
| 85 base::TimeTicks creation_time); | 91 base::TimeTicks creation_time); |
| 86 | 92 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 178 |
| 173 // Has the MWCO observed at least one navigation? | 179 // Has the MWCO observed at least one navigation? |
| 174 bool has_navigated_; | 180 bool has_navigated_; |
| 175 | 181 |
| 176 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); | 182 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); |
| 177 }; | 183 }; |
| 178 | 184 |
| 179 } // namespace page_load_metrics | 185 } // namespace page_load_metrics |
| 180 | 186 |
| 181 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 187 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |