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 COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_WEB_CONTENTS_OBSE
RVER_H_ | 5 #ifndef COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_WEB_CONTENTS_OBSE
RVER_H_ |
6 #define COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_WEB_CONTENTS_OBSE
RVER_H_ | 6 #define COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_WEB_CONTENTS_OBSE
RVER_H_ |
7 | 7 |
8 #include "base/containers/scoped_ptr_map.h" | 8 #include <map> |
| 9 |
9 #include "base/macros.h" | 10 #include "base/macros.h" |
10 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
11 #include "base/time/time.h" | 12 #include "base/time/time.h" |
12 #include "components/page_load_metrics/browser/page_load_metrics_observer.h" | 13 #include "components/page_load_metrics/browser/page_load_metrics_observer.h" |
13 #include "components/page_load_metrics/common/page_load_timing.h" | 14 #include "components/page_load_metrics/common/page_load_timing.h" |
14 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
15 #include "content/public/browser/web_contents_observer.h" | 16 #include "content/public/browser/web_contents_observer.h" |
16 #include "content/public/browser/web_contents_user_data.h" | 17 #include "content/public/browser/web_contents_user_data.h" |
17 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
18 | 19 |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 284 |
284 void OnTimingUpdated(content::RenderFrameHost*, const PageLoadTiming& timing); | 285 void OnTimingUpdated(content::RenderFrameHost*, const PageLoadTiming& timing); |
285 | 286 |
286 // True if the web contents is currently in the foreground. | 287 // True if the web contents is currently in the foreground. |
287 bool in_foreground_; | 288 bool in_foreground_; |
288 | 289 |
289 // This map tracks all of the navigations ongoing that are not committed | 290 // This map tracks all of the navigations ongoing that are not committed |
290 // yet. Once a navigation is committed, it moves from the map to | 291 // yet. Once a navigation is committed, it moves from the map to |
291 // committed_load_. Note that a PageLoadTrackers NavigationHandle is only | 292 // committed_load_. Note that a PageLoadTrackers NavigationHandle is only |
292 // valid until commit time, when we remove it from the map. | 293 // valid until commit time, when we remove it from the map. |
293 base::ScopedPtrMap<content::NavigationHandle*, scoped_ptr<PageLoadTracker>> | 294 std::map<content::NavigationHandle*, scoped_ptr<PageLoadTracker>> |
294 provisional_loads_; | 295 provisional_loads_; |
295 scoped_ptr<PageLoadTracker> committed_load_; | 296 scoped_ptr<PageLoadTracker> committed_load_; |
296 | 297 |
297 scoped_ptr<PageLoadMetricsEmbedderInterface> embedder_interface_; | 298 scoped_ptr<PageLoadMetricsEmbedderInterface> embedder_interface_; |
298 base::ObserverList<PageLoadMetricsObserver, true> observers_; | 299 base::ObserverList<PageLoadMetricsObserver, true> observers_; |
299 | 300 |
300 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); | 301 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); |
301 }; | 302 }; |
302 | 303 |
303 } // namespace page_load_metrics | 304 } // namespace page_load_metrics |
304 | 305 |
305 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_WEB_CONTENTS_O
BSERVER_H_ | 306 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_WEB_CONTENTS_O
BSERVER_H_ |
OLD | NEW |