Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: chrome/browser/ui/tab_helpers.cc

Issue 2200113002: [New CL] Add a tab helper to record the last visit date for each bookmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "components/tracing/common/tracing_switches.h" 52 #include "components/tracing/common/tracing_switches.h"
53 #include "content/public/browser/web_contents.h" 53 #include "content/public/browser/web_contents.h"
54 54
55 #if BUILDFLAG(ANDROID_JAVA_UI) 55 #if BUILDFLAG(ANDROID_JAVA_UI)
56 #include "chrome/browser/android/banners/app_banner_manager_android.h" 56 #include "chrome/browser/android/banners/app_banner_manager_android.h"
57 #include "chrome/browser/android/data_usage/data_use_tab_helper.h" 57 #include "chrome/browser/android/data_usage/data_use_tab_helper.h"
58 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" 58 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h"
59 #include "chrome/browser/android/offline_pages/recent_tab_helper.h" 59 #include "chrome/browser/android/offline_pages/recent_tab_helper.h"
60 #include "chrome/browser/android/voice_search_tab_helper.h" 60 #include "chrome/browser/android/voice_search_tab_helper.h"
61 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" 61 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h"
62 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
63 #include "chrome/browser/ntp_snippets/bookmark_last_visit_updater.h"
62 #include "chrome/browser/ui/android/context_menu_helper.h" 64 #include "chrome/browser/ui/android/context_menu_helper.h"
63 #include "chrome/browser/ui/android/view_android_helper.h" 65 #include "chrome/browser/ui/android/view_android_helper.h"
64 #include "components/offline_pages/offline_page_feature.h" 66 #include "components/offline_pages/offline_page_feature.h"
65 #else 67 #else
66 #include "chrome/browser/banners/app_banner_manager_desktop.h" 68 #include "chrome/browser/banners/app_banner_manager_desktop.h"
67 #include "chrome/browser/permissions/permission_request_manager.h" 69 #include "chrome/browser/permissions/permission_request_manager.h"
68 #include "chrome/browser/plugins/plugin_observer.h" 70 #include "chrome/browser/plugins/plugin_observer.h"
69 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" 71 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h"
70 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" 72 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h"
71 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 73 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 subresource_filter::ContentSubresourceFilterDriverFactory:: 179 subresource_filter::ContentSubresourceFilterDriverFactory::
178 CreateForWebContents(web_contents); 180 CreateForWebContents(web_contents);
179 // TODO(vabr): Remove TabSpecificContentSettings from here once their function 181 // TODO(vabr): Remove TabSpecificContentSettings from here once their function
180 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 182 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075
181 TabSpecificContentSettings::CreateForWebContents(web_contents); 183 TabSpecificContentSettings::CreateForWebContents(web_contents);
182 184
183 // --- Platform-specific tab helpers --- 185 // --- Platform-specific tab helpers ---
184 186
185 #if BUILDFLAG(ANDROID_JAVA_UI) 187 #if BUILDFLAG(ANDROID_JAVA_UI)
186 banners::AppBannerManagerAndroid::CreateForWebContents(web_contents); 188 banners::AppBannerManagerAndroid::CreateForWebContents(web_contents);
189 BookmarkLastVisitUpdater::CreateForWebContentsWithBookmarkModel(
190 web_contents,
191 BookmarkModelFactory::GetForProfile(
192 Profile::FromBrowserContext(web_contents->GetBrowserContext())));
187 ContextMenuHelper::CreateForWebContents(web_contents); 193 ContextMenuHelper::CreateForWebContents(web_contents);
188 DataUseTabHelper::CreateForWebContents(web_contents); 194 DataUseTabHelper::CreateForWebContents(web_contents);
189 195
190 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents); 196 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents);
191 if (offline_pages::IsOffliningRecentPagesEnabled()) 197 if (offline_pages::IsOffliningRecentPagesEnabled())
192 offline_pages::RecentTabHelper::CreateForWebContents(web_contents); 198 offline_pages::RecentTabHelper::CreateForWebContents(web_contents);
193 199
194 SingleTabModeTabHelper::CreateForWebContents(web_contents); 200 SingleTabModeTabHelper::CreateForWebContents(web_contents);
195 ViewAndroidHelper::CreateForWebContents(web_contents); 201 ViewAndroidHelper::CreateForWebContents(web_contents);
196 VoiceSearchTabHelper::CreateForWebContents(web_contents); 202 VoiceSearchTabHelper::CreateForWebContents(web_contents);
(...skipping 14 matching lines...) Expand all
211 SearchEngineTabHelper::CreateForWebContents(web_contents); 217 SearchEngineTabHelper::CreateForWebContents(web_contents);
212 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); 218 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents);
213 TabDialogs::CreateForWebContents(web_contents); 219 TabDialogs::CreateForWebContents(web_contents);
214 ThumbnailTabHelper::CreateForWebContents(web_contents); 220 ThumbnailTabHelper::CreateForWebContents(web_contents);
215 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); 221 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents);
216 222
217 if (banners::AppBannerManagerDesktop::IsEnabled()) 223 if (banners::AppBannerManagerDesktop::IsEnabled())
218 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents); 224 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents);
219 #endif 225 #endif
220 226
221 // --- Feature tab helpers behind flags --- 227 // --- Feature tab helpers behind flags ---
222 228
223 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 229 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
224 CaptivePortalTabHelper::CreateForWebContents(web_contents); 230 CaptivePortalTabHelper::CreateForWebContents(web_contents);
225 #endif 231 #endif
226 232
227 #if defined(ENABLE_EXTENSIONS) 233 #if defined(ENABLE_EXTENSIONS)
228 extensions::TabHelper::CreateForWebContents(web_contents); 234 extensions::TabHelper::CreateForWebContents(web_contents);
229 #endif 235 #endif
230 236
231 #if defined(ENABLE_SUPERVISED_USERS) 237 #if defined(ENABLE_SUPERVISED_USERS)
(...skipping 18 matching lines...) Expand all
250 256
251 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( 257 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile(
252 web_contents->GetBrowserContext())) { 258 web_contents->GetBrowserContext())) {
253 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( 259 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents(
254 web_contents); 260 web_contents);
255 } 261 }
256 262
257 if (tracing::NavigationTracingObserver::IsEnabled()) 263 if (tracing::NavigationTracingObserver::IsEnabled())
258 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); 264 tracing::NavigationTracingObserver::CreateForWebContents(web_contents);
259 } 265 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698