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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "components/tracing/common/tracing_switches.h" | 53 #include "components/tracing/common/tracing_switches.h" |
54 #include "content/public/browser/web_contents.h" | 54 #include "content/public/browser/web_contents.h" |
55 | 55 |
56 #if BUILDFLAG(ANDROID_JAVA_UI) | 56 #if BUILDFLAG(ANDROID_JAVA_UI) |
57 #include "chrome/browser/android/banners/app_banner_manager_android.h" | 57 #include "chrome/browser/android/banners/app_banner_manager_android.h" |
58 #include "chrome/browser/android/data_usage/data_use_tab_helper.h" | 58 #include "chrome/browser/android/data_usage/data_use_tab_helper.h" |
59 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" | 59 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" |
60 #include "chrome/browser/android/offline_pages/recent_tab_helper.h" | 60 #include "chrome/browser/android/offline_pages/recent_tab_helper.h" |
61 #include "chrome/browser/android/voice_search_tab_helper.h" | 61 #include "chrome/browser/android/voice_search_tab_helper.h" |
62 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 62 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
| 63 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 64 #include "chrome/browser/ntp_snippets/bookmark_last_visit_updater.h" |
63 #include "chrome/browser/ui/android/context_menu_helper.h" | 65 #include "chrome/browser/ui/android/context_menu_helper.h" |
64 #include "chrome/browser/ui/android/view_android_helper.h" | 66 #include "chrome/browser/ui/android/view_android_helper.h" |
65 #include "components/offline_pages/offline_page_feature.h" | 67 #include "components/offline_pages/offline_page_feature.h" |
66 #else | 68 #else |
67 #include "chrome/browser/banners/app_banner_manager_desktop.h" | 69 #include "chrome/browser/banners/app_banner_manager_desktop.h" |
68 #include "chrome/browser/permissions/permission_request_manager.h" | 70 #include "chrome/browser/permissions/permission_request_manager.h" |
69 #include "chrome/browser/plugins/plugin_observer.h" | 71 #include "chrome/browser/plugins/plugin_observer.h" |
70 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 72 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
71 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 73 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
72 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 74 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 subresource_filter::ContentSubresourceFilterDriverFactory:: | 180 subresource_filter::ContentSubresourceFilterDriverFactory:: |
179 CreateForWebContents(web_contents); | 181 CreateForWebContents(web_contents); |
180 // TODO(vabr): Remove TabSpecificContentSettings from here once their function | 182 // TODO(vabr): Remove TabSpecificContentSettings from here once their function |
181 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 | 183 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 |
182 TabSpecificContentSettings::CreateForWebContents(web_contents); | 184 TabSpecificContentSettings::CreateForWebContents(web_contents); |
183 | 185 |
184 // --- Platform-specific tab helpers --- | 186 // --- Platform-specific tab helpers --- |
185 | 187 |
186 #if BUILDFLAG(ANDROID_JAVA_UI) | 188 #if BUILDFLAG(ANDROID_JAVA_UI) |
187 banners::AppBannerManagerAndroid::CreateForWebContents(web_contents); | 189 banners::AppBannerManagerAndroid::CreateForWebContents(web_contents); |
| 190 BookmarkLastVisitUpdater::CreateForWebContentsWithBookmarkModel( |
| 191 web_contents, |
| 192 BookmarkModelFactory::GetForProfile( |
| 193 Profile::FromBrowserContext(web_contents->GetBrowserContext()))); |
188 ContextMenuHelper::CreateForWebContents(web_contents); | 194 ContextMenuHelper::CreateForWebContents(web_contents); |
189 DataUseTabHelper::CreateForWebContents(web_contents); | 195 DataUseTabHelper::CreateForWebContents(web_contents); |
190 | 196 |
191 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents); | 197 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents); |
192 if (offline_pages::IsOffliningRecentPagesEnabled()) | 198 if (offline_pages::IsOffliningRecentPagesEnabled()) |
193 offline_pages::RecentTabHelper::CreateForWebContents(web_contents); | 199 offline_pages::RecentTabHelper::CreateForWebContents(web_contents); |
194 | 200 |
195 SingleTabModeTabHelper::CreateForWebContents(web_contents); | 201 SingleTabModeTabHelper::CreateForWebContents(web_contents); |
196 ViewAndroidHelper::CreateForWebContents(web_contents); | 202 ViewAndroidHelper::CreateForWebContents(web_contents); |
197 VoiceSearchTabHelper::CreateForWebContents(web_contents); | 203 VoiceSearchTabHelper::CreateForWebContents(web_contents); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 261 |
256 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 262 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
257 web_contents->GetBrowserContext())) { | 263 web_contents->GetBrowserContext())) { |
258 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 264 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
259 web_contents); | 265 web_contents); |
260 } | 266 } |
261 | 267 |
262 if (tracing::NavigationTracingObserver::IsEnabled()) | 268 if (tracing::NavigationTracingObserver::IsEnabled()) |
263 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 269 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
264 } | 270 } |
OLD | NEW |