| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/ui/tab_helpers.h" | 5 #include "chrome/browser/ui/tab_helpers.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 13 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/content_settings/mixed_content_settings_tab_helper.h" | 15 #include "chrome/browser/content_settings/mixed_content_settings_tab_helper.h" |
| 16 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 16 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 17 #include "chrome/browser/data_use_measurement/data_use_web_contents_observer.h" | 17 #include "chrome/browser/data_use_measurement/data_use_web_contents_observer.h" |
| 18 #include "chrome/browser/engagement/site_engagement_helper.h" | 18 #include "chrome/browser/engagement/site_engagement_helper.h" |
| 19 #include "chrome/browser/engagement/site_engagement_service.h" | 19 #include "chrome/browser/engagement/site_engagement_service.h" |
| 20 #include "chrome/browser/external_protocol/external_protocol_observer.h" | 20 #include "chrome/browser/external_protocol/external_protocol_observer.h" |
| 21 #include "chrome/browser/favicon/favicon_utils.h" | 21 #include "chrome/browser/favicon/favicon_utils.h" |
| 22 #include "chrome/browser/history/history_tab_helper.h" | 22 #include "chrome/browser/history/history_tab_helper.h" |
| 23 #include "chrome/browser/history/top_sites_factory.h" | 23 #include "chrome/browser/history/top_sites_factory.h" |
| 24 #include "chrome/browser/infobars/infobar_service.h" | 24 #include "chrome/browser/infobars/infobar_service.h" |
| 25 #include "chrome/browser/media/media_engagement_service.h" |
| 25 #include "chrome/browser/metrics/desktop_session_duration/desktop_session_durati
on_observer.h" | 26 #include "chrome/browser/metrics/desktop_session_duration/desktop_session_durati
on_observer.h" |
| 26 #include "chrome/browser/metrics/renderer_uptime_web_contents_observer.h" | 27 #include "chrome/browser/metrics/renderer_uptime_web_contents_observer.h" |
| 27 #include "chrome/browser/net/net_error_tab_helper.h" | 28 #include "chrome/browser/net/net_error_tab_helper.h" |
| 28 #include "chrome/browser/net/predictor_tab_helper.h" | 29 #include "chrome/browser/net/predictor_tab_helper.h" |
| 29 #include "chrome/browser/ntp_snippets/bookmark_last_visit_updater.h" | 30 #include "chrome/browser/ntp_snippets/bookmark_last_visit_updater.h" |
| 30 #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" | 31 #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" |
| 31 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 32 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 32 #include "chrome/browser/permissions/permission_request_manager.h" | 33 #include "chrome/browser/permissions/permission_request_manager.h" |
| 33 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" | 34 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" |
| 34 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" | 35 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 } | 292 } |
| 292 | 293 |
| 293 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 294 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
| 294 web_contents->GetBrowserContext())) { | 295 web_contents->GetBrowserContext())) { |
| 295 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 296 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
| 296 web_contents); | 297 web_contents); |
| 297 } | 298 } |
| 298 | 299 |
| 299 if (tracing::NavigationTracingObserver::IsEnabled()) | 300 if (tracing::NavigationTracingObserver::IsEnabled()) |
| 300 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 301 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
| 302 |
| 303 if (MediaEngagementService::IsEnabled()) |
| 304 MediaEngagementService::CreateWebContentsObserver(web_contents); |
| 301 } | 305 } |
| OLD | NEW |