| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/content_settings/chrome_content_settings_client.h" | 10 #include "chrome/browser/content_settings/chrome_content_settings_client.h" |
| 11 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 11 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 12 #include "chrome/browser/engagement/site_engagement_helper.h" | 12 #include "chrome/browser/engagement/site_engagement_helper.h" |
| 13 #include "chrome/browser/engagement/site_engagement_service.h" | 13 #include "chrome/browser/engagement/site_engagement_service.h" |
| 14 #include "chrome/browser/external_protocol/external_protocol_observer.h" | 14 #include "chrome/browser/external_protocol/external_protocol_observer.h" |
| 15 #include "chrome/browser/favicon/favicon_utils.h" | 15 #include "chrome/browser/favicon/favicon_utils.h" |
| 16 #include "chrome/browser/history/history_tab_helper.h" | 16 #include "chrome/browser/history/history_tab_helper.h" |
| 17 #include "chrome/browser/history/top_sites_factory.h" | 17 #include "chrome/browser/history/top_sites_factory.h" |
| 18 #include "chrome/browser/infobars/infobar_service.h" | 18 #include "chrome/browser/infobars/infobar_service.h" |
| 19 #include "chrome/browser/metrics/desktop_engagement/desktop_engagement_observer.
h" | 19 #include "chrome/browser/metrics/desktop_engagement/desktop_engagement_observer.
h" |
| 20 #include "chrome/browser/net/net_error_tab_helper.h" | 20 #include "chrome/browser/net/net_error_tab_helper.h" |
| 21 #include "chrome/browser/net/predictor_tab_helper.h" | 21 #include "chrome/browser/net/predictor_tab_helper.h" |
| 22 #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" | 22 #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" |
| 23 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 23 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 24 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" | 24 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" |
| 25 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" | 25 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" |
| 26 #include "chrome/browser/prerender/prerender_tab_helper.h" | 26 #include "chrome/browser/prerender/prerender_tab_helper.h" |
| 27 #include "chrome/browser/previews/previews_infobar_tab_helper.h" |
| 27 #include "chrome/browser/profiles/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
| 28 #include "chrome/browser/sessions/session_tab_helper.h" | 29 #include "chrome/browser/sessions/session_tab_helper.h" |
| 29 #include "chrome/browser/ssl/chrome_security_state_model_client.h" | 30 #include "chrome/browser/ssl/chrome_security_state_model_client.h" |
| 30 #include "chrome/browser/subresource_filter/chrome_subresource_filter_client.h" | 31 #include "chrome/browser/subresource_filter/chrome_subresource_filter_client.h" |
| 31 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" | 32 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" |
| 32 #include "chrome/browser/tracing/navigation_tracing.h" | 33 #include "chrome/browser/tracing/navigation_tracing.h" |
| 33 #include "chrome/browser/translate/chrome_translate_client.h" | 34 #include "chrome/browser/translate/chrome_translate_client.h" |
| 34 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" | 35 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
| 35 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" | 36 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" |
| 36 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 37 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 Profile::FromBrowserContext( | 168 Profile::FromBrowserContext( |
| 168 web_contents->GetBrowserContext())).get()); | 169 web_contents->GetBrowserContext())).get()); |
| 169 HistoryTabHelper::CreateForWebContents(web_contents); | 170 HistoryTabHelper::CreateForWebContents(web_contents); |
| 170 InfoBarService::CreateForWebContents(web_contents); | 171 InfoBarService::CreateForWebContents(web_contents); |
| 171 NavigationCorrectionTabObserver::CreateForWebContents(web_contents); | 172 NavigationCorrectionTabObserver::CreateForWebContents(web_contents); |
| 172 NavigationMetricsRecorder::CreateForWebContents(web_contents); | 173 NavigationMetricsRecorder::CreateForWebContents(web_contents); |
| 173 chrome::InitializePageLoadMetricsForWebContents(web_contents); | 174 chrome::InitializePageLoadMetricsForWebContents(web_contents); |
| 174 PopupBlockerTabHelper::CreateForWebContents(web_contents); | 175 PopupBlockerTabHelper::CreateForWebContents(web_contents); |
| 175 PrefsTabHelper::CreateForWebContents(web_contents); | 176 PrefsTabHelper::CreateForWebContents(web_contents); |
| 176 prerender::PrerenderTabHelper::CreateForWebContents(web_contents); | 177 prerender::PrerenderTabHelper::CreateForWebContents(web_contents); |
| 178 PreviewsInfoBarTabHelper::CreateForWebContents(web_contents); |
| 177 SearchTabHelper::CreateForWebContents(web_contents); | 179 SearchTabHelper::CreateForWebContents(web_contents); |
| 178 ChromeSecurityStateModelClient::CreateForWebContents(web_contents); | 180 ChromeSecurityStateModelClient::CreateForWebContents(web_contents); |
| 179 if (SiteEngagementService::IsEnabled()) | 181 if (SiteEngagementService::IsEnabled()) |
| 180 SiteEngagementService::Helper::CreateForWebContents(web_contents); | 182 SiteEngagementService::Helper::CreateForWebContents(web_contents); |
| 181 std::unique_ptr<ChromeSubresourceFilterClient> subresource_filter_client( | 183 std::unique_ptr<ChromeSubresourceFilterClient> subresource_filter_client( |
| 182 new ChromeSubresourceFilterClient(web_contents)); | 184 new ChromeSubresourceFilterClient(web_contents)); |
| 183 subresource_filter::ContentSubresourceFilterDriverFactory:: | 185 subresource_filter::ContentSubresourceFilterDriverFactory:: |
| 184 CreateForWebContents(web_contents, std::move(subresource_filter_client)); | 186 CreateForWebContents(web_contents, std::move(subresource_filter_client)); |
| 185 // TODO(vabr): Remove TabSpecificContentSettings from here once their function | 187 // TODO(vabr): Remove TabSpecificContentSettings from here once their function |
| 186 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 | 188 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 265 |
| 264 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 266 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
| 265 web_contents->GetBrowserContext())) { | 267 web_contents->GetBrowserContext())) { |
| 266 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 268 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
| 267 web_contents); | 269 web_contents); |
| 268 } | 270 } |
| 269 | 271 |
| 270 if (tracing::NavigationTracingObserver::IsEnabled()) | 272 if (tracing::NavigationTracingObserver::IsEnabled()) |
| 271 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 273 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
| 272 } | 274 } |
| OLD | NEW |