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

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

Issue 2124243002: Refactor the Java AppBannerManager to be owned by native code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing reviewer comments Created 4 years, 5 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h" 51 #include "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h"
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/data_usage/data_use_tab_helper.h" 57 #include "chrome/browser/android/data_usage/data_use_tab_helper.h"
57 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" 58 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h"
58 #include "chrome/browser/android/offline_pages/recent_tab_helper.h" 59 #include "chrome/browser/android/offline_pages/recent_tab_helper.h"
59 #include "chrome/browser/android/voice_search_tab_helper.h" 60 #include "chrome/browser/android/voice_search_tab_helper.h"
60 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" 61 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h"
61 #include "chrome/browser/ui/android/context_menu_helper.h" 62 #include "chrome/browser/ui/android/context_menu_helper.h"
62 #include "chrome/browser/ui/android/view_android_helper.h" 63 #include "chrome/browser/ui/android/view_android_helper.h"
63 #include "components/offline_pages/offline_page_feature.h" 64 #include "components/offline_pages/offline_page_feature.h"
64 #else 65 #else
65 #include "chrome/browser/banners/app_banner_manager_desktop.h" 66 #include "chrome/browser/banners/app_banner_manager_desktop.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 SiteEngagementService::Helper::CreateForWebContents(web_contents); 176 SiteEngagementService::Helper::CreateForWebContents(web_contents);
176 subresource_filter::ContentSubresourceFilterDriverFactory:: 177 subresource_filter::ContentSubresourceFilterDriverFactory::
177 CreateForWebContents(web_contents); 178 CreateForWebContents(web_contents);
178 // TODO(vabr): Remove TabSpecificContentSettings from here once their function 179 // TODO(vabr): Remove TabSpecificContentSettings from here once their function
179 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 180 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075
180 TabSpecificContentSettings::CreateForWebContents(web_contents); 181 TabSpecificContentSettings::CreateForWebContents(web_contents);
181 182
182 // --- Platform-specific tab helpers --- 183 // --- Platform-specific tab helpers ---
183 184
184 #if BUILDFLAG(ANDROID_JAVA_UI) 185 #if BUILDFLAG(ANDROID_JAVA_UI)
186 banners::AppBannerManagerAndroid::CreateForWebContents(web_contents);
185 ContextMenuHelper::CreateForWebContents(web_contents); 187 ContextMenuHelper::CreateForWebContents(web_contents);
186 DataUseTabHelper::CreateForWebContents(web_contents); 188 DataUseTabHelper::CreateForWebContents(web_contents);
187 189
188 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents); 190 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents);
189 if (offline_pages::IsOffliningRecentPagesEnabled()) 191 if (offline_pages::IsOffliningRecentPagesEnabled())
190 offline_pages::RecentTabHelper::CreateForWebContents(web_contents); 192 offline_pages::RecentTabHelper::CreateForWebContents(web_contents);
191 193
192 SingleTabModeTabHelper::CreateForWebContents(web_contents); 194 SingleTabModeTabHelper::CreateForWebContents(web_contents);
193 ViewAndroidHelper::CreateForWebContents(web_contents); 195 ViewAndroidHelper::CreateForWebContents(web_contents);
194 VoiceSearchTabHelper::CreateForWebContents(web_contents); 196 VoiceSearchTabHelper::CreateForWebContents(web_contents);
(...skipping 10 matching lines...) Expand all
205 PermissionBubbleManager::CreateForWebContents(web_contents); 207 PermissionBubbleManager::CreateForWebContents(web_contents);
206 PluginObserver::CreateForWebContents(web_contents); 208 PluginObserver::CreateForWebContents(web_contents);
207 SadTabHelper::CreateForWebContents(web_contents); 209 SadTabHelper::CreateForWebContents(web_contents);
208 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); 210 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents);
209 SearchEngineTabHelper::CreateForWebContents(web_contents); 211 SearchEngineTabHelper::CreateForWebContents(web_contents);
210 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); 212 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents);
211 TabDialogs::CreateForWebContents(web_contents); 213 TabDialogs::CreateForWebContents(web_contents);
212 ThumbnailTabHelper::CreateForWebContents(web_contents); 214 ThumbnailTabHelper::CreateForWebContents(web_contents);
213 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); 215 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents);
214 216
215 if (banners::AppBannerManagerDesktop::IsEnabled()) { 217 if (banners::AppBannerManagerDesktop::IsEnabled())
216 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents); 218 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents);
217 }
218 #endif 219 #endif
219 220
220 // --- Feature tab helpers behind flags --- 221 // --- Feature tab helpers behind flags ---
221 222
222 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 223 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
223 CaptivePortalTabHelper::CreateForWebContents(web_contents); 224 CaptivePortalTabHelper::CreateForWebContents(web_contents);
224 #endif 225 #endif
225 226
226 #if defined(ENABLE_EXTENSIONS) 227 #if defined(ENABLE_EXTENSIONS)
227 extensions::TabHelper::CreateForWebContents(web_contents); 228 extensions::TabHelper::CreateForWebContents(web_contents);
(...skipping 21 matching lines...) Expand all
249 250
250 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( 251 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile(
251 web_contents->GetBrowserContext())) { 252 web_contents->GetBrowserContext())) {
252 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( 253 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents(
253 web_contents); 254 web_contents);
254 } 255 }
255 256
256 if (tracing::NavigationTracingObserver::IsEnabled()) 257 if (tracing::NavigationTracingObserver::IsEnabled())
257 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); 258 tracing::NavigationTracingObserver::CreateForWebContents(web_contents);
258 } 259 }
OLDNEW
« chrome/browser/banners/app_banner_manager.h ('K') | « chrome/browser/banners/app_banner_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698