| 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> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "chrome/browser/profiles/profile.h" | 31 #include "chrome/browser/profiles/profile.h" |
| 32 #include "chrome/browser/sessions/session_tab_helper.h" | 32 #include "chrome/browser/sessions/session_tab_helper.h" |
| 33 #include "chrome/browser/ssl/chrome_security_state_model_client.h" | 33 #include "chrome/browser/ssl/chrome_security_state_model_client.h" |
| 34 #include "chrome/browser/subresource_filter/chrome_subresource_filter_client.h" | 34 #include "chrome/browser/subresource_filter/chrome_subresource_filter_client.h" |
| 35 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" | 35 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" |
| 36 #include "chrome/browser/tracing/navigation_tracing.h" | 36 #include "chrome/browser/tracing/navigation_tracing.h" |
| 37 #include "chrome/browser/translate/chrome_translate_client.h" | 37 #include "chrome/browser/translate/chrome_translate_client.h" |
| 38 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" | 38 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
| 39 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" | 39 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" |
| 40 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 40 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 41 #include "chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h" | |
| 42 #include "chrome/browser/ui/navigation_correction_tab_observer.h" | 41 #include "chrome/browser/ui/navigation_correction_tab_observer.h" |
| 43 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" | 42 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" |
| 44 #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" | 43 #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" |
| 45 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" | 44 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |
| 46 #include "chrome/browser/ui/search/search_tab_helper.h" | 45 #include "chrome/browser/ui/search/search_tab_helper.h" |
| 47 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 46 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
| 48 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 47 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
| 49 #include "chrome/browser/ui/tab_dialogs.h" | 48 #include "chrome/browser/ui/tab_dialogs.h" |
| 50 #include "chrome/common/chrome_switches.h" | 49 #include "chrome/common/chrome_switches.h" |
| 51 #include "chrome/common/features.h" | 50 #include "chrome/common/features.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 72 #include "chrome/browser/ui/android/context_menu_helper.h" | 71 #include "chrome/browser/ui/android/context_menu_helper.h" |
| 73 #include "chrome/browser/ui/android/view_android_helper.h" | 72 #include "chrome/browser/ui/android/view_android_helper.h" |
| 74 #else | 73 #else |
| 75 #include "chrome/browser/banners/app_banner_manager_desktop.h" | 74 #include "chrome/browser/banners/app_banner_manager_desktop.h" |
| 76 #include "chrome/browser/permissions/permission_request_manager.h" | 75 #include "chrome/browser/permissions/permission_request_manager.h" |
| 77 #include "chrome/browser/plugins/plugin_observer.h" | 76 #include "chrome/browser/plugins/plugin_observer.h" |
| 78 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 77 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
| 79 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 78 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
| 80 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 79 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
| 81 #include "chrome/browser/ui/hung_plugin_tab_helper.h" | 80 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
| 81 #include "chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h" |
| 82 #include "chrome/browser/ui/sad_tab_helper.h" | 82 #include "chrome/browser/ui/sad_tab_helper.h" |
| 83 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 83 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
| 84 #include "components/pdf/browser/pdf_web_contents_helper.h" | 84 #include "components/pdf/browser/pdf_web_contents_helper.h" |
| 85 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 85 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 86 #include "components/zoom/zoom_controller.h" | 86 #include "components/zoom/zoom_controller.h" |
| 87 #endif // BUILDFLAG(ANDROID_JAVA_UI) | 87 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
| 88 | 88 |
| 89 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) | 89 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| 90 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 90 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
| 91 #endif | 91 #endif |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 web_contents); | 166 web_contents); |
| 167 ExternalProtocolObserver::CreateForWebContents(web_contents); | 167 ExternalProtocolObserver::CreateForWebContents(web_contents); |
| 168 favicon::CreateContentFaviconDriverForWebContents(web_contents); | 168 favicon::CreateContentFaviconDriverForWebContents(web_contents); |
| 169 FindTabHelper::CreateForWebContents(web_contents); | 169 FindTabHelper::CreateForWebContents(web_contents); |
| 170 history::WebContentsTopSitesObserver::CreateForWebContents( | 170 history::WebContentsTopSitesObserver::CreateForWebContents( |
| 171 web_contents, TopSitesFactory::GetForProfile( | 171 web_contents, TopSitesFactory::GetForProfile( |
| 172 Profile::FromBrowserContext( | 172 Profile::FromBrowserContext( |
| 173 web_contents->GetBrowserContext())).get()); | 173 web_contents->GetBrowserContext())).get()); |
| 174 HistoryTabHelper::CreateForWebContents(web_contents); | 174 HistoryTabHelper::CreateForWebContents(web_contents); |
| 175 InfoBarService::CreateForWebContents(web_contents); | 175 InfoBarService::CreateForWebContents(web_contents); |
| 176 JavaScriptDialogTabHelper::CreateForWebContents(web_contents); | |
| 177 NavigationCorrectionTabObserver::CreateForWebContents(web_contents); | 176 NavigationCorrectionTabObserver::CreateForWebContents(web_contents); |
| 178 NavigationMetricsRecorder::CreateForWebContents(web_contents); | 177 NavigationMetricsRecorder::CreateForWebContents(web_contents); |
| 179 chrome::InitializePageLoadMetricsForWebContents(web_contents); | 178 chrome::InitializePageLoadMetricsForWebContents(web_contents); |
| 180 PopupBlockerTabHelper::CreateForWebContents(web_contents); | 179 PopupBlockerTabHelper::CreateForWebContents(web_contents); |
| 181 PrefsTabHelper::CreateForWebContents(web_contents); | 180 PrefsTabHelper::CreateForWebContents(web_contents); |
| 182 prerender::PrerenderTabHelper::CreateForWebContents(web_contents); | 181 prerender::PrerenderTabHelper::CreateForWebContents(web_contents); |
| 183 PreviewsInfoBarTabHelper::CreateForWebContents(web_contents); | 182 PreviewsInfoBarTabHelper::CreateForWebContents(web_contents); |
| 184 SearchTabHelper::CreateForWebContents(web_contents); | 183 SearchTabHelper::CreateForWebContents(web_contents); |
| 185 SearchEngineTabHelper::CreateForWebContents(web_contents); | 184 SearchEngineTabHelper::CreateForWebContents(web_contents); |
| 186 ChromeSecurityStateModelClient::CreateForWebContents(web_contents); | 185 ChromeSecurityStateModelClient::CreateForWebContents(web_contents); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 209 | 208 |
| 210 SingleTabModeTabHelper::CreateForWebContents(web_contents); | 209 SingleTabModeTabHelper::CreateForWebContents(web_contents); |
| 211 ViewAndroidHelper::CreateForWebContents(web_contents); | 210 ViewAndroidHelper::CreateForWebContents(web_contents); |
| 212 VoiceSearchTabHelper::CreateForWebContents(web_contents); | 211 VoiceSearchTabHelper::CreateForWebContents(web_contents); |
| 213 #else | 212 #else |
| 214 BookmarkTabHelper::CreateForWebContents(web_contents); | 213 BookmarkTabHelper::CreateForWebContents(web_contents); |
| 215 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( | 214 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( |
| 216 web_contents); | 215 web_contents); |
| 217 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); | 216 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); |
| 218 HungPluginTabHelper::CreateForWebContents(web_contents); | 217 HungPluginTabHelper::CreateForWebContents(web_contents); |
| 218 JavaScriptDialogTabHelper::CreateForWebContents(web_contents); |
| 219 ManagePasswordsUIController::CreateForWebContents(web_contents); | 219 ManagePasswordsUIController::CreateForWebContents(web_contents); |
| 220 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( | 220 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( |
| 221 web_contents, std::unique_ptr<pdf::PDFWebContentsHelperClient>( | 221 web_contents, std::unique_ptr<pdf::PDFWebContentsHelperClient>( |
| 222 new ChromePDFWebContentsHelperClient())); | 222 new ChromePDFWebContentsHelperClient())); |
| 223 PermissionRequestManager::CreateForWebContents(web_contents); | 223 PermissionRequestManager::CreateForWebContents(web_contents); |
| 224 PluginObserver::CreateForWebContents(web_contents); | 224 PluginObserver::CreateForWebContents(web_contents); |
| 225 SadTabHelper::CreateForWebContents(web_contents); | 225 SadTabHelper::CreateForWebContents(web_contents); |
| 226 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); | 226 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); |
| 227 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); | 227 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); |
| 228 TabDialogs::CreateForWebContents(web_contents); | 228 TabDialogs::CreateForWebContents(web_contents); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 269 |
| 270 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 270 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
| 271 web_contents->GetBrowserContext())) { | 271 web_contents->GetBrowserContext())) { |
| 272 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 272 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
| 273 web_contents); | 273 web_contents); |
| 274 } | 274 } |
| 275 | 275 |
| 276 if (tracing::NavigationTracingObserver::IsEnabled()) | 276 if (tracing::NavigationTracingObserver::IsEnabled()) |
| 277 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 277 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
| 278 } | 278 } |
| OLD | NEW |