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

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

Issue 2184263005: 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: Comments #2 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 71 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
72 #include "chrome/browser/ui/hung_plugin_tab_helper.h" 72 #include "chrome/browser/ui/hung_plugin_tab_helper.h"
73 #include "chrome/browser/ui/sad_tab_helper.h" 73 #include "chrome/browser/ui/sad_tab_helper.h"
74 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" 74 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
75 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" 75 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h"
76 #include "components/pdf/browser/pdf_web_contents_helper.h" 76 #include "components/pdf/browser/pdf_web_contents_helper.h"
77 #include "components/web_modal/web_contents_modal_dialog_manager.h" 77 #include "components/web_modal/web_contents_modal_dialog_manager.h"
78 #include "components/zoom/zoom_controller.h" 78 #include "components/zoom/zoom_controller.h"
79 #endif // BUILDFLAG(ANDROID_JAVA_UI) 79 #endif // BUILDFLAG(ANDROID_JAVA_UI)
80 80
81 #if defined(OS_ANDROID)
82 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
Avi (use Gerrit) 2016/08/01 17:01:41 Why is this different than the ANDROID_JAVA_UI blo
Philipp Keck 2016/08/02 13:05:33 The only documentation I found on these flags is t
Ted C 2016/08/03 01:11:40 Does this code work with the webui based NTP or ju
83 #include "chrome/browser/ntp_snippets/bookmark_last_visit_updater.h"
84 #endif // defined(OS_ANDROID)
85
81 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 86 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
82 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" 87 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h"
83 #endif 88 #endif
84 89
85 #if defined(ENABLE_EXTENSIONS) 90 #if defined(ENABLE_EXTENSIONS)
86 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 91 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
87 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 92 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
88 #include "chrome/browser/extensions/tab_helper.h" 93 #include "chrome/browser/extensions/tab_helper.h"
89 #include "extensions/browser/view_type_utils.h" 94 #include "extensions/browser/view_type_utils.h"
90 #endif 95 #endif
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 SearchEngineTabHelper::CreateForWebContents(web_contents); 216 SearchEngineTabHelper::CreateForWebContents(web_contents);
212 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); 217 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents);
213 TabDialogs::CreateForWebContents(web_contents); 218 TabDialogs::CreateForWebContents(web_contents);
214 ThumbnailTabHelper::CreateForWebContents(web_contents); 219 ThumbnailTabHelper::CreateForWebContents(web_contents);
215 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); 220 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents);
216 221
217 if (banners::AppBannerManagerDesktop::IsEnabled()) 222 if (banners::AppBannerManagerDesktop::IsEnabled())
218 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents); 223 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents);
219 #endif 224 #endif
220 225
226 #if defined(OS_ANDROID)
227 BookmarkLastVisitUpdater::CreateForWebContentsWithBookmarkModel(
228 web_contents,
229 BookmarkModelFactory::GetForProfile(
230 Profile::FromBrowserContext(web_contents->GetBrowserContext())));
Avi (use Gerrit) 2016/08/01 17:01:41 You should totally fix BookmarkModelFactory::GetFo
Philipp Keck 2016/08/02 13:05:33 Added BookmarkModelFactory::GetForBrowserContext(c
231 #endif // defined(OS_ANDROID)
232
221 // --- Feature tab helpers behind flags --- 233 // --- Feature tab helpers behind flags ---
222 234
223 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 235 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
224 CaptivePortalTabHelper::CreateForWebContents(web_contents); 236 CaptivePortalTabHelper::CreateForWebContents(web_contents);
225 #endif 237 #endif
226 238
227 #if defined(ENABLE_EXTENSIONS) 239 #if defined(ENABLE_EXTENSIONS)
228 extensions::TabHelper::CreateForWebContents(web_contents); 240 extensions::TabHelper::CreateForWebContents(web_contents);
229 #endif 241 #endif
230 242
(...skipping 19 matching lines...) Expand all
250 262
251 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( 263 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile(
252 web_contents->GetBrowserContext())) { 264 web_contents->GetBrowserContext())) {
253 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( 265 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents(
254 web_contents); 266 web_contents);
255 } 267 }
256 268
257 if (tracing::NavigationTracingObserver::IsEnabled()) 269 if (tracing::NavigationTracingObserver::IsEnabled())
258 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); 270 tracing::NavigationTracingObserver::CreateForWebContents(web_contents);
259 } 271 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698