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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 171 |
166 // Has the MWCO observed at least one navigation? | 172 // Has the MWCO observed at least one navigation? |
167 bool has_navigated_; | 173 bool has_navigated_; |
168 | 174 |
169 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); | 175 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); |
170 }; | 176 }; |
171 | 177 |
172 } // namespace page_load_metrics | 178 } // namespace page_load_metrics |
173 | 179 |
174 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 180 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |