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