| 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/page_load_metrics/page_load_metrics_initialize.h" |   20 #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" | 
|   21 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |   21 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 
|   22 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" |   22 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" | 
|   23 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" |   23 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" | 
|   24 #include "chrome/browser/prerender/prerender_tab_helper.h" |   24 #include "chrome/browser/prerender/prerender_tab_helper.h" | 
|   25 #include "chrome/browser/profiles/profile.h" |   25 #include "chrome/browser/profiles/profile.h" | 
|   26 #include "chrome/browser/sessions/session_tab_helper.h" |   26 #include "chrome/browser/sessions/session_tab_helper.h" | 
|   27 #include "chrome/browser/ssl/security_state_model.h" |   27 #include "chrome/browser/ssl/chrome_security_state_model_client.h" | 
|   28 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" |   28 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" | 
|   29 #include "chrome/browser/tracing/navigation_tracing.h" |   29 #include "chrome/browser/tracing/navigation_tracing.h" | 
|   30 #include "chrome/browser/translate/chrome_translate_client.h" |   30 #include "chrome/browser/translate/chrome_translate_client.h" | 
|   31 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |   31 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" | 
|   32 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" |   32 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" | 
|   33 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |   33 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 
|   34 #include "chrome/browser/ui/navigation_correction_tab_observer.h" |   34 #include "chrome/browser/ui/navigation_correction_tab_observer.h" | 
|   35 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" |   35 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" | 
|   36 #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" |   36 #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" | 
|   37 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |   37 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" | 
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  163   HistoryTabHelper::CreateForWebContents(web_contents); |  163   HistoryTabHelper::CreateForWebContents(web_contents); | 
|  164   InfoBarService::CreateForWebContents(web_contents); |  164   InfoBarService::CreateForWebContents(web_contents); | 
|  165   ManagePasswordsUIController::CreateForWebContents(web_contents); |  165   ManagePasswordsUIController::CreateForWebContents(web_contents); | 
|  166   NavigationCorrectionTabObserver::CreateForWebContents(web_contents); |  166   NavigationCorrectionTabObserver::CreateForWebContents(web_contents); | 
|  167   NavigationMetricsRecorder::CreateForWebContents(web_contents); |  167   NavigationMetricsRecorder::CreateForWebContents(web_contents); | 
|  168   chrome::InitializePageLoadMetricsForWebContents(web_contents); |  168   chrome::InitializePageLoadMetricsForWebContents(web_contents); | 
|  169   PopupBlockerTabHelper::CreateForWebContents(web_contents); |  169   PopupBlockerTabHelper::CreateForWebContents(web_contents); | 
|  170   PrefsTabHelper::CreateForWebContents(web_contents); |  170   PrefsTabHelper::CreateForWebContents(web_contents); | 
|  171   prerender::PrerenderTabHelper::CreateForWebContents(web_contents); |  171   prerender::PrerenderTabHelper::CreateForWebContents(web_contents); | 
|  172   SearchTabHelper::CreateForWebContents(web_contents); |  172   SearchTabHelper::CreateForWebContents(web_contents); | 
|  173   SecurityStateModel::CreateForWebContents(web_contents); |  173   ChromeSecurityStateModelClient::CreateForWebContents(web_contents); | 
|  174   if (SiteEngagementService::IsEnabled()) |  174   if (SiteEngagementService::IsEnabled()) | 
|  175     SiteEngagementHelper::CreateForWebContents(web_contents); |  175     SiteEngagementHelper::CreateForWebContents(web_contents); | 
|  176   // TODO(vabr): Remove TabSpecificContentSettings from here once their function |  176   // TODO(vabr): Remove TabSpecificContentSettings from here once their function | 
|  177   // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 |  177   // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 | 
|  178   TabSpecificContentSettings::CreateForWebContents(web_contents); |  178   TabSpecificContentSettings::CreateForWebContents(web_contents); | 
|  179  |  179  | 
|  180   // --- Platform-specific tab helpers --- |  180   // --- Platform-specific tab helpers --- | 
|  181  |  181  | 
|  182 #if defined(OS_ANDROID) |  182 #if defined(OS_ANDROID) | 
|  183   ContextMenuHelper::CreateForWebContents(web_contents); |  183   ContextMenuHelper::CreateForWebContents(web_contents); | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  251  |  251  | 
|  252   if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |  252   if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 
|  253       web_contents->GetBrowserContext())) { |  253       web_contents->GetBrowserContext())) { | 
|  254     predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |  254     predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 
|  255         web_contents); |  255         web_contents); | 
|  256   } |  256   } | 
|  257  |  257  | 
|  258   if (tracing::NavigationTracingObserver::IsEnabled()) |  258   if (tracing::NavigationTracingObserver::IsEnabled()) | 
|  259     tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |  259     tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 
|  260 } |  260 } | 
| OLD | NEW |