| 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" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "components/dom_distiller/content/browser/web_contents_main_frame_obser
ver.h" | 46 #include "components/dom_distiller/content/browser/web_contents_main_frame_obser
ver.h" |
| 47 #include "components/dom_distiller/core/dom_distiller_switches.h" | 47 #include "components/dom_distiller/core/dom_distiller_switches.h" |
| 48 #include "components/history/content/browser/web_contents_top_sites_observer.h" | 48 #include "components/history/content/browser/web_contents_top_sites_observer.h" |
| 49 #include "components/history/core/browser/top_sites.h" | 49 #include "components/history/core/browser/top_sites.h" |
| 50 #include "components/password_manager/core/browser/password_manager.h" | 50 #include "components/password_manager/core/browser/password_manager.h" |
| 51 #include "components/tracing/tracing_switches.h" | 51 #include "components/tracing/tracing_switches.h" |
| 52 #include "content/public/browser/web_contents.h" | 52 #include "content/public/browser/web_contents.h" |
| 53 | 53 |
| 54 #if BUILDFLAG(ANDROID_JAVA_UI) | 54 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 55 #include "chrome/browser/android/data_usage/data_use_tab_helper.h" | 55 #include "chrome/browser/android/data_usage/data_use_tab_helper.h" |
| 56 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" |
| 56 #include "chrome/browser/android/voice_search_tab_helper.h" | 57 #include "chrome/browser/android/voice_search_tab_helper.h" |
| 57 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 58 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
| 58 #include "chrome/browser/ui/android/context_menu_helper.h" | 59 #include "chrome/browser/ui/android/context_menu_helper.h" |
| 59 #include "chrome/browser/ui/android/view_android_helper.h" | 60 #include "chrome/browser/ui/android/view_android_helper.h" |
| 60 #else | 61 #else |
| 61 #include "chrome/browser/banners/app_banner_manager_desktop.h" | 62 #include "chrome/browser/banners/app_banner_manager_desktop.h" |
| 62 #include "chrome/browser/plugins/plugin_observer.h" | 63 #include "chrome/browser/plugins/plugin_observer.h" |
| 63 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 64 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
| 64 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 65 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
| 65 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 66 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 SiteEngagementHelper::CreateForWebContents(web_contents); | 173 SiteEngagementHelper::CreateForWebContents(web_contents); |
| 173 // TODO(vabr): Remove TabSpecificContentSettings from here once their function | 174 // TODO(vabr): Remove TabSpecificContentSettings from here once their function |
| 174 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 | 175 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 |
| 175 TabSpecificContentSettings::CreateForWebContents(web_contents); | 176 TabSpecificContentSettings::CreateForWebContents(web_contents); |
| 176 | 177 |
| 177 // --- Platform-specific tab helpers --- | 178 // --- Platform-specific tab helpers --- |
| 178 | 179 |
| 179 #if BUILDFLAG(ANDROID_JAVA_UI) | 180 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 180 ContextMenuHelper::CreateForWebContents(web_contents); | 181 ContextMenuHelper::CreateForWebContents(web_contents); |
| 181 DataUseTabHelper::CreateForWebContents(web_contents); | 182 DataUseTabHelper::CreateForWebContents(web_contents); |
| 183 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents); |
| 182 SingleTabModeTabHelper::CreateForWebContents(web_contents); | 184 SingleTabModeTabHelper::CreateForWebContents(web_contents); |
| 183 ViewAndroidHelper::CreateForWebContents(web_contents); | 185 ViewAndroidHelper::CreateForWebContents(web_contents); |
| 184 VoiceSearchTabHelper::CreateForWebContents(web_contents); | 186 VoiceSearchTabHelper::CreateForWebContents(web_contents); |
| 185 #else | 187 #else |
| 186 BookmarkTabHelper::CreateForWebContents(web_contents); | 188 BookmarkTabHelper::CreateForWebContents(web_contents); |
| 187 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( | 189 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( |
| 188 web_contents); | 190 web_contents); |
| 189 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); | 191 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); |
| 190 HungPluginTabHelper::CreateForWebContents(web_contents); | 192 HungPluginTabHelper::CreateForWebContents(web_contents); |
| 191 ManagePasswordsUIController::CreateForWebContents(web_contents); | 193 ManagePasswordsUIController::CreateForWebContents(web_contents); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 247 |
| 246 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 248 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
| 247 web_contents->GetBrowserContext())) { | 249 web_contents->GetBrowserContext())) { |
| 248 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 250 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
| 249 web_contents); | 251 web_contents); |
| 250 } | 252 } |
| 251 | 253 |
| 252 if (tracing::NavigationTracingObserver::IsEnabled()) | 254 if (tracing::NavigationTracingObserver::IsEnabled()) |
| 253 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 255 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
| 254 } | 256 } |
| OLD | NEW |