| 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 "base/containers/scoped_ptr_map.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class Message; | 27 class Message; |
| 28 } // namespace IPC | 28 } // namespace IPC |
| 29 | 29 |
| 30 namespace rappor { | 30 namespace rappor { |
| 31 class RapporService; | 31 class RapporService; |
| 32 } | 32 } |
| 33 | 33 |
| 34 namespace page_load_metrics { | 34 namespace page_load_metrics { |
| 35 | 35 |
| 36 // These constants are for keeping the tests in sync. | 36 // These constants are for keeping the tests in sync. |
| 37 const char kHistogramNameFirstLayout[] = | 37 const char kHistogramFirstLayout[] = "PageLoad.Timing2.NavigationToFirstLayout"; |
| 38 "PageLoad.Timing2.NavigationToFirstLayout"; | 38 const char kHistogramFirstTextPaint[] = |
| 39 const char kHistogramNameFirstTextPaint[] = | |
| 40 "PageLoad.Timing2.NavigationToFirstTextPaint"; | 39 "PageLoad.Timing2.NavigationToFirstTextPaint"; |
| 41 const char kHistogramNameDomContent[] = | 40 const char kHistogramDomContentLoaded[] = |
| 42 "PageLoad.Timing2.NavigationToDOMContentLoadedEventFired"; | 41 "PageLoad.Timing2.NavigationToDOMContentLoadedEventFired"; |
| 43 const char kHistogramNameLoad[] = "PageLoad.Timing2.NavigationToLoadEventFired"; | 42 const char kHistogramLoad[] = "PageLoad.Timing2.NavigationToLoadEventFired"; |
| 44 const char kBGHistogramNameFirstLayout[] = | 43 const char kHistogramFirstPaint[] = "PageLoad.Timing2.NavigationToFirstPaint"; |
| 44 const char kHistogramFirstImagePaint[] = |
| 45 "PageLoad.Timing2.NavigationToFirstImagePaint"; |
| 46 const char kHistogramFirstContentfulPaint[] = |
| 47 "PageLoad.Timing2.NavigationToFirstContentfulPaint"; |
| 48 const char kBackgroundHistogramFirstLayout[] = |
| 45 "PageLoad.Timing2.NavigationToFirstLayout.Background"; | 49 "PageLoad.Timing2.NavigationToFirstLayout.Background"; |
| 46 const char kBGHistogramNameFirstTextPaint[] = | 50 const char kBackgroundHistogramFirstTextPaint[] = |
| 47 "PageLoad.Timing2.NavigationToFirstTextPaint.Background"; | 51 "PageLoad.Timing2.NavigationToFirstTextPaint.Background"; |
| 48 const char kBGHistogramNameDomContent[] = | 52 const char kBackgroundHistogramDomContentLoaded[] = |
| 49 "PageLoad.Timing2.NavigationToDOMContentLoadedEventFired.Background"; | 53 "PageLoad.Timing2.NavigationToDOMContentLoadedEventFired.Background"; |
| 50 const char kBGHistogramNameLoad[] = | 54 const char kBackgroundHistogramLoad[] = |
| 51 "PageLoad.Timing2.NavigationToLoadEventFired.Background"; | 55 "PageLoad.Timing2.NavigationToLoadEventFired.Background"; |
| 56 const char kBackgroundHistogramFirstPaint[] = |
| 57 "PageLoad.Timing2.NavigationToFirstPaint.Background"; |
| 58 const char kBackgroundHistogramFirstImagePaint[] = |
| 59 "PageLoad.Timing2.NavigationToFirstImagePaint.Background."; |
| 60 const char kBackgroundHistogramFirstContentfulPaint[] = |
| 61 "PageLoad.Timing2.NavigationToFirstContentfulPaint.Background"; |
| 62 |
| 63 const char kHistogramFirstBackground[] = |
| 64 "PageLoad.Timing2.NavigationToFirstBackground"; |
| 65 const char kHistogramFirstForeground[] = |
| 66 "PageLoad.Timing2.NavigationToFirstForeground"; |
| 52 | 67 |
| 53 const char kProvisionalEvents[] = "PageLoad.Events.Provisional"; | 68 const char kProvisionalEvents[] = "PageLoad.Events.Provisional"; |
| 54 const char kCommittedEvents[] = "PageLoad.Events.Committed"; | 69 const char kCommittedEvents[] = "PageLoad.Events.Committed"; |
| 55 const char kBGProvisionalEvents[] = "PageLoad.Events.Provisional.Background"; | 70 const char kBackgroundProvisionalEvents[] = |
| 56 const char kBGCommittedEvents[] = "PageLoad.Events.Committed.Background"; | 71 "PageLoad.Events.Provisional.Background"; |
| 72 const char kBackgroundCommittedEvents[] = |
| 73 "PageLoad.Events.Committed.Background"; |
| 57 | 74 |
| 58 const char kErrorEvents[] = "PageLoad.Events.InternalError"; | 75 const char kErrorEvents[] = "PageLoad.Events.InternalError"; |
| 59 | 76 |
| 60 const char kRapporMetricsNameCoarseTiming[] = | 77 const char kRapporMetricsNameCoarseTiming[] = |
| 61 "PageLoad.CoarseTiming.NavigationToFirstContentfulPaint"; | 78 "PageLoad.CoarseTiming.NavigationToFirstContentfulPaint"; |
| 62 | 79 |
| 63 // NOTE: Some of these histograms are separated into a separate histogram | 80 // NOTE: Some of these histograms are separated into a separate histogram |
| 64 // specified by the ".Background" suffix. For these events, we put them into the | 81 // specified by the ".Background" suffix. For these events, we put them into the |
| 65 // background histogram if the web contents was ever in the background from | 82 // background histogram if the web contents was ever in the background from |
| 66 // navigation start to the event in question. | 83 // navigation start to the event in question. |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 289 |
| 273 scoped_ptr<PageLoadMetricsEmbedderInterface> embedder_interface_; | 290 scoped_ptr<PageLoadMetricsEmbedderInterface> embedder_interface_; |
| 274 base::ObserverList<PageLoadMetricsObserver, true> observers_; | 291 base::ObserverList<PageLoadMetricsObserver, true> observers_; |
| 275 | 292 |
| 276 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); | 293 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); |
| 277 }; | 294 }; |
| 278 | 295 |
| 279 } // namespace page_load_metrics | 296 } // namespace page_load_metrics |
| 280 | 297 |
| 281 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_WEB_CONTENTS_O
BSERVER_H_ | 298 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_WEB_CONTENTS_O
BSERVER_H_ |
| OLD | NEW |