| 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/data_use_measurement/chrome_data_use_ascriber_service_f
actory.h" |
| 13 #include "chrome/browser/data_use_measurement/data_use_web_contents_observer.h" |
| 12 #include "chrome/browser/engagement/site_engagement_helper.h" | 14 #include "chrome/browser/engagement/site_engagement_helper.h" |
| 13 #include "chrome/browser/engagement/site_engagement_service.h" | 15 #include "chrome/browser/engagement/site_engagement_service.h" |
| 14 #include "chrome/browser/external_protocol/external_protocol_observer.h" | 16 #include "chrome/browser/external_protocol/external_protocol_observer.h" |
| 15 #include "chrome/browser/favicon/favicon_utils.h" | 17 #include "chrome/browser/favicon/favicon_utils.h" |
| 16 #include "chrome/browser/history/history_tab_helper.h" | 18 #include "chrome/browser/history/history_tab_helper.h" |
| 17 #include "chrome/browser/history/top_sites_factory.h" | 19 #include "chrome/browser/history/top_sites_factory.h" |
| 18 #include "chrome/browser/infobars/infobar_service.h" | 20 #include "chrome/browser/infobars/infobar_service.h" |
| 19 #include "chrome/browser/metrics/desktop_engagement/desktop_engagement_observer.
h" | 21 #include "chrome/browser/metrics/desktop_engagement/desktop_engagement_observer.
h" |
| 20 #include "chrome/browser/net/net_error_tab_helper.h" | 22 #include "chrome/browser/net/net_error_tab_helper.h" |
| 21 #include "chrome/browser/net/predictor_tab_helper.h" | 23 #include "chrome/browser/net/predictor_tab_helper.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 g_browser_process->GetApplicationLocale(), | 153 g_browser_process->GetApplicationLocale(), |
| 152 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); | 154 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); |
| 153 chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents); | 155 chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents); |
| 154 chrome_browser_net::PredictorTabHelper::CreateForWebContents(web_contents); | 156 chrome_browser_net::PredictorTabHelper::CreateForWebContents(web_contents); |
| 155 ChromeContentSettingsClient::CreateForWebContents(web_contents); | 157 ChromeContentSettingsClient::CreateForWebContents(web_contents); |
| 156 ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( | 158 ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( |
| 157 web_contents, | 159 web_contents, |
| 158 autofill::ChromeAutofillClient::FromWebContents(web_contents)); | 160 autofill::ChromeAutofillClient::FromWebContents(web_contents)); |
| 159 ChromeTranslateClient::CreateForWebContents(web_contents); | 161 ChromeTranslateClient::CreateForWebContents(web_contents); |
| 160 CoreTabHelper::CreateForWebContents(web_contents); | 162 CoreTabHelper::CreateForWebContents(web_contents); |
| 163 data_use_measurement::DataUseWebContentsObserver::CreateForWebContents( |
| 164 web_contents, |
| 165 data_use_measurement::ChromeDataUseAscriberServiceFactory:: |
| 166 GetForBrowserContext(web_contents->GetBrowserContext())); |
| 161 ExternalProtocolObserver::CreateForWebContents(web_contents); | 167 ExternalProtocolObserver::CreateForWebContents(web_contents); |
| 162 favicon::CreateContentFaviconDriverForWebContents(web_contents); | 168 favicon::CreateContentFaviconDriverForWebContents(web_contents); |
| 163 FindTabHelper::CreateForWebContents(web_contents); | 169 FindTabHelper::CreateForWebContents(web_contents); |
| 164 history::WebContentsTopSitesObserver::CreateForWebContents( | 170 history::WebContentsTopSitesObserver::CreateForWebContents( |
| 165 web_contents, TopSitesFactory::GetForProfile( | 171 web_contents, TopSitesFactory::GetForProfile( |
| 166 Profile::FromBrowserContext( | 172 Profile::FromBrowserContext( |
| 167 web_contents->GetBrowserContext())).get()); | 173 web_contents->GetBrowserContext())).get()); |
| 168 HistoryTabHelper::CreateForWebContents(web_contents); | 174 HistoryTabHelper::CreateForWebContents(web_contents); |
| 169 InfoBarService::CreateForWebContents(web_contents); | 175 InfoBarService::CreateForWebContents(web_contents); |
| 170 NavigationCorrectionTabObserver::CreateForWebContents(web_contents); | 176 NavigationCorrectionTabObserver::CreateForWebContents(web_contents); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 267 |
| 262 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 268 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
| 263 web_contents->GetBrowserContext())) { | 269 web_contents->GetBrowserContext())) { |
| 264 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 270 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
| 265 web_contents); | 271 web_contents); |
| 266 } | 272 } |
| 267 | 273 |
| 268 if (tracing::NavigationTracingObserver::IsEnabled()) | 274 if (tracing::NavigationTracingObserver::IsEnabled()) |
| 269 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 275 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
| 270 } | 276 } |
| OLD | NEW |