| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 CreateForWebContents(web_contents); | 181 CreateForWebContents(web_contents); |
| 182 // TODO(vabr): Remove TabSpecificContentSettings from here once their function | 182 // TODO(vabr): Remove TabSpecificContentSettings from here once their function |
| 183 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 | 183 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 |
| 184 TabSpecificContentSettings::CreateForWebContents(web_contents); | 184 TabSpecificContentSettings::CreateForWebContents(web_contents); |
| 185 | 185 |
| 186 // --- Platform-specific tab helpers --- | 186 // --- Platform-specific tab helpers --- |
| 187 | 187 |
| 188 #if BUILDFLAG(ANDROID_JAVA_UI) | 188 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 189 banners::AppBannerManagerAndroid::CreateForWebContents(web_contents); | 189 banners::AppBannerManagerAndroid::CreateForWebContents(web_contents); |
| 190 BookmarkLastVisitUpdater::CreateForWebContentsWithBookmarkModel( | 190 BookmarkLastVisitUpdater::CreateForWebContentsWithBookmarkModel( |
| 191 web_contents, | 191 web_contents, BookmarkModelFactory::GetForBrowserContext( |
| 192 BookmarkModelFactory::GetForProfile( | 192 web_contents->GetBrowserContext())); |
| 193 Profile::FromBrowserContext(web_contents->GetBrowserContext()))); | |
| 194 ContextMenuHelper::CreateForWebContents(web_contents); | 193 ContextMenuHelper::CreateForWebContents(web_contents); |
| 195 DataUseTabHelper::CreateForWebContents(web_contents); | 194 DataUseTabHelper::CreateForWebContents(web_contents); |
| 196 | 195 |
| 197 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents); | 196 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents); |
| 198 if (offline_pages::IsOffliningRecentPagesEnabled()) | 197 if (offline_pages::IsOffliningRecentPagesEnabled()) |
| 199 offline_pages::RecentTabHelper::CreateForWebContents(web_contents); | 198 offline_pages::RecentTabHelper::CreateForWebContents(web_contents); |
| 200 | 199 |
| 201 SingleTabModeTabHelper::CreateForWebContents(web_contents); | 200 SingleTabModeTabHelper::CreateForWebContents(web_contents); |
| 202 ViewAndroidHelper::CreateForWebContents(web_contents); | 201 ViewAndroidHelper::CreateForWebContents(web_contents); |
| 203 VoiceSearchTabHelper::CreateForWebContents(web_contents); | 202 VoiceSearchTabHelper::CreateForWebContents(web_contents); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 260 |
| 262 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 261 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
| 263 web_contents->GetBrowserContext())) { | 262 web_contents->GetBrowserContext())) { |
| 264 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 263 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
| 265 web_contents); | 264 web_contents); |
| 266 } | 265 } |
| 267 | 266 |
| 268 if (tracing::NavigationTracingObserver::IsEnabled()) | 267 if (tracing::NavigationTracingObserver::IsEnabled()) |
| 269 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 268 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
| 270 } | 269 } |
| OLD | NEW |