| 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" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 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/media/media_engagement_service.h" |
| 26 #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" |
| 27 #include "chrome/browser/metrics/renderer_uptime_web_contents_observer.h" | 27 #include "chrome/browser/metrics/renderer_uptime_web_contents_observer.h" |
| 28 #include "chrome/browser/net/net_error_tab_helper.h" | 28 #include "chrome/browser/net/net_error_tab_helper.h" |
| 29 #include "chrome/browser/net/predictor_tab_helper.h" | 29 #include "chrome/browser/net/predictor_tab_helper.h" |
| 30 #include "chrome/browser/ntp_snippets/bookmark_last_visit_updater.h" | 30 #include "chrome/browser/ntp_snippets/bookmark_last_visit_updater.h" |
| 31 #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" | 31 #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" |
| 32 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 32 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 33 #include "chrome/browser/permissions/permission_request_manager.h" | 33 #include "chrome/browser/permissions/permission_request_manager.h" |
| 34 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" | 34 #include "chrome/browser/predictors/loading_predictor_factory.h" |
| 35 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" | 35 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" |
| 36 #include "chrome/browser/prerender/prerender_tab_helper.h" | 36 #include "chrome/browser/prerender/prerender_tab_helper.h" |
| 37 #include "chrome/browser/previews/previews_infobar_tab_helper.h" | 37 #include "chrome/browser/previews/previews_infobar_tab_helper.h" |
| 38 #include "chrome/browser/profiles/profile.h" | 38 #include "chrome/browser/profiles/profile.h" |
| 39 #include "chrome/browser/sessions/session_tab_helper.h" | 39 #include "chrome/browser/sessions/session_tab_helper.h" |
| 40 #include "chrome/browser/ssl/security_state_tab_helper.h" | 40 #include "chrome/browser/ssl/security_state_tab_helper.h" |
| 41 #include "chrome/browser/subresource_filter/chrome_subresource_filter_client.h" | 41 #include "chrome/browser/subresource_filter/chrome_subresource_filter_client.h" |
| 42 #include "chrome/browser/sync/sessions/sync_sessions_router_tab_helper.h" | 42 #include "chrome/browser/sync/sessions/sync_sessions_router_tab_helper.h" |
| 43 #include "chrome/browser/sync/sessions/sync_sessions_web_contents_router_factory
.h" | 43 #include "chrome/browser/sync/sessions/sync_sessions_web_contents_router_factory
.h" |
| 44 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" | 44 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) | 284 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 285 #endif // BUILDFLAG(ENABLE_PRINTING) && !defined(OS_ANDROID) | 285 #endif // BUILDFLAG(ENABLE_PRINTING) && !defined(OS_ANDROID) |
| 286 | 286 |
| 287 bool enabled_distiller = base::CommandLine::ForCurrentProcess()->HasSwitch( | 287 bool enabled_distiller = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 288 switches::kEnableDomDistiller); | 288 switches::kEnableDomDistiller); |
| 289 if (enabled_distiller) { | 289 if (enabled_distiller) { |
| 290 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( | 290 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( |
| 291 web_contents); | 291 web_contents); |
| 292 } | 292 } |
| 293 | 293 |
| 294 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 294 if (predictors::LoadingPredictorFactory::GetForProfile( |
| 295 web_contents->GetBrowserContext())) { | 295 Profile::FromBrowserContext(web_contents->GetBrowserContext()))) { |
| 296 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 296 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
| 297 web_contents); | 297 web_contents); |
| 298 } | 298 } |
| 299 | 299 |
| 300 if (tracing::NavigationTracingObserver::IsEnabled()) | 300 if (tracing::NavigationTracingObserver::IsEnabled()) |
| 301 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 301 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
| 302 | 302 |
| 303 if (MediaEngagementService::IsEnabled()) | 303 if (MediaEngagementService::IsEnabled()) |
| 304 MediaEngagementService::CreateWebContentsObserver(web_contents); | 304 MediaEngagementService::CreateWebContentsObserver(web_contents); |
| 305 } | 305 } |
| OLD | NEW |