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 "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/content_settings/chrome_content_settings_client.h" | 9 #include "chrome/browser/content_settings/chrome_content_settings_client.h" |
10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "components/password_manager/core/browser/password_manager.h" | 45 #include "components/password_manager/core/browser/password_manager.h" |
46 #include "content/public/browser/web_contents.h" | 46 #include "content/public/browser/web_contents.h" |
47 | 47 |
48 #if defined(OS_ANDROID) | 48 #if defined(OS_ANDROID) |
49 #include "chrome/browser/android/voice_search_tab_helper.h" | 49 #include "chrome/browser/android/voice_search_tab_helper.h" |
50 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 50 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
51 #include "chrome/browser/enhanced_bookmarks/android/enhanced_bookmark_tab_helper
.h" | 51 #include "chrome/browser/enhanced_bookmarks/android/enhanced_bookmark_tab_helper
.h" |
52 #include "chrome/browser/ui/android/context_menu_helper.h" | 52 #include "chrome/browser/ui/android/context_menu_helper.h" |
53 #include "chrome/browser/ui/android/window_android_helper.h" | 53 #include "chrome/browser/ui/android/window_android_helper.h" |
54 #else | 54 #else |
| 55 #include "chrome/browser/banners/app_banner_manager_desktop.h" |
55 #include "chrome/browser/plugins/plugin_observer.h" | 56 #include "chrome/browser/plugins/plugin_observer.h" |
56 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 57 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
57 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 58 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
58 #include "chrome/browser/ui/hung_plugin_tab_helper.h" | 59 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
59 #include "chrome/browser/ui/sad_tab_helper.h" | 60 #include "chrome/browser/ui/sad_tab_helper.h" |
60 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 61 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
61 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 62 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
62 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" | 63 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
63 #include "components/pdf/browser/pdf_web_contents_helper.h" | 64 #include "components/pdf/browser/pdf_web_contents_helper.h" |
64 #include "components/ui/zoom/zoom_controller.h" | 65 #include "components/ui/zoom/zoom_controller.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 new ChromePDFWebContentsHelperClient())); | 188 new ChromePDFWebContentsHelperClient())); |
188 PermissionBubbleManager::CreateForWebContents(web_contents); | 189 PermissionBubbleManager::CreateForWebContents(web_contents); |
189 PluginObserver::CreateForWebContents(web_contents); | 190 PluginObserver::CreateForWebContents(web_contents); |
190 SadTabHelper::CreateForWebContents(web_contents); | 191 SadTabHelper::CreateForWebContents(web_contents); |
191 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); | 192 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); |
192 SearchEngineTabHelper::CreateForWebContents(web_contents); | 193 SearchEngineTabHelper::CreateForWebContents(web_contents); |
193 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); | 194 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); |
194 TabDialogs::CreateForWebContents(web_contents); | 195 TabDialogs::CreateForWebContents(web_contents); |
195 ThumbnailTabHelper::CreateForWebContents(web_contents); | 196 ThumbnailTabHelper::CreateForWebContents(web_contents); |
196 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); | 197 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); |
| 198 |
| 199 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 200 switches::kEnableAddToShelf)) { |
| 201 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents); |
| 202 } |
197 #endif | 203 #endif |
198 ExternalProtocolObserver::CreateForWebContents(web_contents); | 204 ExternalProtocolObserver::CreateForWebContents(web_contents); |
199 | 205 |
200 #if defined(OS_WIN) | 206 #if defined(OS_WIN) |
201 MetroPinTabHelper::CreateForWebContents(web_contents); | 207 MetroPinTabHelper::CreateForWebContents(web_contents); |
202 #endif | 208 #endif |
203 | 209 |
204 // --- Feature tab helpers behind flags --- | 210 // --- Feature tab helpers behind flags --- |
205 | 211 |
206 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 212 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
(...skipping 22 matching lines...) Expand all Loading... |
229 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( | 235 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( |
230 web_contents); | 236 web_contents); |
231 } | 237 } |
232 | 238 |
233 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 239 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
234 web_contents->GetBrowserContext())) { | 240 web_contents->GetBrowserContext())) { |
235 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 241 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
236 web_contents); | 242 web_contents); |
237 } | 243 } |
238 } | 244 } |
OLD | NEW |