| 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 "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/content_settings/chrome_content_settings_client.h" | 9 #include "chrome/browser/content_settings/chrome_content_settings_client.h" |
| 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 11 #include "chrome/browser/engagement/site_engagement_helper.h" | 11 #include "chrome/browser/engagement/site_engagement_helper.h" |
| 12 #include "chrome/browser/engagement/site_engagement_service.h" | 12 #include "chrome/browser/engagement/site_engagement_service.h" |
| 13 #include "chrome/browser/external_protocol/external_protocol_observer.h" | 13 #include "chrome/browser/external_protocol/external_protocol_observer.h" |
| 14 #include "chrome/browser/favicon/favicon_utils.h" | 14 #include "chrome/browser/favicon/favicon_utils.h" |
| 15 #include "chrome/browser/history/history_tab_helper.h" | 15 #include "chrome/browser/history/history_tab_helper.h" |
| 16 #include "chrome/browser/history/top_sites_factory.h" | 16 #include "chrome/browser/history/top_sites_factory.h" |
| 17 #include "chrome/browser/infobars/infobar_service.h" | 17 #include "chrome/browser/infobars/infobar_service.h" |
| 18 #include "chrome/browser/net/net_error_tab_helper.h" | 18 #include "chrome/browser/net/net_error_tab_helper.h" |
| 19 #include "chrome/browser/net/predictor_tab_helper.h" | 19 #include "chrome/browser/net/predictor_tab_helper.h" |
| 20 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 20 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 21 #include "chrome/browser/permissions/permission_infobar_manager.h" |
| 21 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" | 22 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" |
| 22 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" | 23 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" |
| 23 #include "chrome/browser/prerender/prerender_tab_helper.h" | 24 #include "chrome/browser/prerender/prerender_tab_helper.h" |
| 24 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
| 25 #include "chrome/browser/sessions/session_tab_helper.h" | 26 #include "chrome/browser/sessions/session_tab_helper.h" |
| 26 #include "chrome/browser/ssl/security_state_model.h" | 27 #include "chrome/browser/ssl/security_state_model.h" |
| 27 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" | 28 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" |
| 28 #include "chrome/browser/tracing/navigation_tracing.h" | 29 #include "chrome/browser/tracing/navigation_tracing.h" |
| 29 #include "chrome/browser/translate/chrome_translate_client.h" | 30 #include "chrome/browser/translate/chrome_translate_client.h" |
| 30 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" | 31 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 web_contents, TopSitesFactory::GetForProfile( | 159 web_contents, TopSitesFactory::GetForProfile( |
| 159 Profile::FromBrowserContext( | 160 Profile::FromBrowserContext( |
| 160 web_contents->GetBrowserContext())).get()); | 161 web_contents->GetBrowserContext())).get()); |
| 161 HistoryTabHelper::CreateForWebContents(web_contents); | 162 HistoryTabHelper::CreateForWebContents(web_contents); |
| 162 InfoBarService::CreateForWebContents(web_contents); | 163 InfoBarService::CreateForWebContents(web_contents); |
| 163 ManagePasswordsUIController::CreateForWebContents(web_contents); | 164 ManagePasswordsUIController::CreateForWebContents(web_contents); |
| 164 NavigationCorrectionTabObserver::CreateForWebContents(web_contents); | 165 NavigationCorrectionTabObserver::CreateForWebContents(web_contents); |
| 165 NavigationMetricsRecorder::CreateForWebContents(web_contents); | 166 NavigationMetricsRecorder::CreateForWebContents(web_contents); |
| 166 page_load_metrics::MetricsWebContentsObserver::CreateForWebContents( | 167 page_load_metrics::MetricsWebContentsObserver::CreateForWebContents( |
| 167 web_contents); | 168 web_contents); |
| 169 PermissionInfoBarManager::CreateForWebContents(web_contents); |
| 168 PopupBlockerTabHelper::CreateForWebContents(web_contents); | 170 PopupBlockerTabHelper::CreateForWebContents(web_contents); |
| 169 PrefsTabHelper::CreateForWebContents(web_contents); | 171 PrefsTabHelper::CreateForWebContents(web_contents); |
| 170 prerender::PrerenderTabHelper::CreateForWebContents(web_contents); | 172 prerender::PrerenderTabHelper::CreateForWebContents(web_contents); |
| 171 SearchTabHelper::CreateForWebContents(web_contents); | 173 SearchTabHelper::CreateForWebContents(web_contents); |
| 172 SecurityStateModel::CreateForWebContents(web_contents); | 174 SecurityStateModel::CreateForWebContents(web_contents); |
| 173 if (SiteEngagementService::IsEnabled()) | 175 if (SiteEngagementService::IsEnabled()) |
| 174 SiteEngagementHelper::CreateForWebContents(web_contents); | 176 SiteEngagementHelper::CreateForWebContents(web_contents); |
| 175 // TODO(vabr): Remove TabSpecificContentSettings from here once their function | 177 // TODO(vabr): Remove TabSpecificContentSettings from here once their function |
| 176 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 | 178 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 |
| 177 TabSpecificContentSettings::CreateForWebContents(web_contents); | 179 TabSpecificContentSettings::CreateForWebContents(web_contents); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 web_contents); | 249 web_contents); |
| 248 } | 250 } |
| 249 | 251 |
| 250 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 252 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 251 switches::kEnableNavigationTracing) && | 253 switches::kEnableNavigationTracing) && |
| 252 base::CommandLine::ForCurrentProcess()->HasSwitch( | 254 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 253 switches::kTraceUploadURL)) { | 255 switches::kTraceUploadURL)) { |
| 254 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 256 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
| 255 } | 257 } |
| 256 } | 258 } |
| OLD | NEW |