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" |
| 11 #include "chrome/browser/external_protocol/external_protocol_observer.h" |
11 #include "chrome/browser/favicon/favicon_helper.h" | 12 #include "chrome/browser/favicon/favicon_helper.h" |
12 #include "chrome/browser/history/history_tab_helper.h" | 13 #include "chrome/browser/history/history_tab_helper.h" |
13 #include "chrome/browser/infobars/infobar_service.h" | 14 #include "chrome/browser/infobars/infobar_service.h" |
14 #include "chrome/browser/net/net_error_tab_helper.h" | 15 #include "chrome/browser/net/net_error_tab_helper.h" |
15 #include "chrome/browser/net/predictor_tab_helper.h" | 16 #include "chrome/browser/net/predictor_tab_helper.h" |
16 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 17 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
17 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" | 18 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" |
18 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" | 19 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" |
19 #include "chrome/browser/prerender/prerender_tab_helper.h" | 20 #include "chrome/browser/prerender/prerender_tab_helper.h" |
20 #include "chrome/browser/sessions/session_tab_helper.h" | 21 #include "chrome/browser/sessions/session_tab_helper.h" |
(...skipping 17 matching lines...) Expand all Loading... |
38 #include "components/password_manager/core/browser/password_manager.h" | 39 #include "components/password_manager/core/browser/password_manager.h" |
39 #include "content/public/browser/web_contents.h" | 40 #include "content/public/browser/web_contents.h" |
40 | 41 |
41 #if defined(OS_ANDROID) | 42 #if defined(OS_ANDROID) |
42 #include "chrome/browser/android/voice_search_tab_helper.h" | 43 #include "chrome/browser/android/voice_search_tab_helper.h" |
43 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 44 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
44 #include "chrome/browser/enhanced_bookmarks/android/enhanced_bookmark_tab_helper
.h" | 45 #include "chrome/browser/enhanced_bookmarks/android/enhanced_bookmark_tab_helper
.h" |
45 #include "chrome/browser/ui/android/context_menu_helper.h" | 46 #include "chrome/browser/ui/android/context_menu_helper.h" |
46 #include "chrome/browser/ui/android/window_android_helper.h" | 47 #include "chrome/browser/ui/android/window_android_helper.h" |
47 #else | 48 #else |
48 #include "chrome/browser/external_protocol/external_protocol_observer.h" | |
49 #include "chrome/browser/plugins/plugin_observer.h" | 49 #include "chrome/browser/plugins/plugin_observer.h" |
50 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 50 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
51 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 51 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
52 #include "chrome/browser/ui/hung_plugin_tab_helper.h" | 52 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
53 #include "chrome/browser/ui/sad_tab_helper.h" | 53 #include "chrome/browser/ui/sad_tab_helper.h" |
54 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 54 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
55 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 55 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
56 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" | 56 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
57 #include "components/pdf/browser/pdf_web_contents_helper.h" | 57 #include "components/pdf/browser/pdf_web_contents_helper.h" |
58 #include "components/ui/zoom/zoom_controller.h" | 58 #include "components/ui/zoom/zoom_controller.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 #if defined(OS_ANDROID) | 161 #if defined(OS_ANDROID) |
162 ContextMenuHelper::CreateForWebContents(web_contents); | 162 ContextMenuHelper::CreateForWebContents(web_contents); |
163 EnhancedBookmarkTabHelper::CreateForWebContents(web_contents); | 163 EnhancedBookmarkTabHelper::CreateForWebContents(web_contents); |
164 SingleTabModeTabHelper::CreateForWebContents(web_contents); | 164 SingleTabModeTabHelper::CreateForWebContents(web_contents); |
165 VoiceSearchTabHelper::CreateForWebContents(web_contents); | 165 VoiceSearchTabHelper::CreateForWebContents(web_contents); |
166 WindowAndroidHelper::CreateForWebContents(web_contents); | 166 WindowAndroidHelper::CreateForWebContents(web_contents); |
167 #else | 167 #else |
168 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( | 168 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( |
169 web_contents); | 169 web_contents); |
170 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); | 170 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); |
171 ExternalProtocolObserver::CreateForWebContents(web_contents); | |
172 HungPluginTabHelper::CreateForWebContents(web_contents); | 171 HungPluginTabHelper::CreateForWebContents(web_contents); |
173 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( | 172 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( |
174 web_contents, | 173 web_contents, |
175 scoped_ptr<pdf::PDFWebContentsHelperClient>( | 174 scoped_ptr<pdf::PDFWebContentsHelperClient>( |
176 new ChromePDFWebContentsHelperClient())); | 175 new ChromePDFWebContentsHelperClient())); |
177 PermissionBubbleManager::CreateForWebContents(web_contents); | 176 PermissionBubbleManager::CreateForWebContents(web_contents); |
178 PluginObserver::CreateForWebContents(web_contents); | 177 PluginObserver::CreateForWebContents(web_contents); |
179 SadTabHelper::CreateForWebContents(web_contents); | 178 SadTabHelper::CreateForWebContents(web_contents); |
180 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); | 179 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); |
181 SearchEngineTabHelper::CreateForWebContents(web_contents); | 180 SearchEngineTabHelper::CreateForWebContents(web_contents); |
182 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); | 181 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); |
183 TabDialogs::CreateForWebContents(web_contents); | 182 TabDialogs::CreateForWebContents(web_contents); |
184 ThumbnailTabHelper::CreateForWebContents(web_contents); | 183 ThumbnailTabHelper::CreateForWebContents(web_contents); |
185 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); | 184 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); |
186 #endif | 185 #endif |
| 186 ExternalProtocolObserver::CreateForWebContents(web_contents); |
187 | 187 |
188 #if defined(OS_WIN) | 188 #if defined(OS_WIN) |
189 MetroPinTabHelper::CreateForWebContents(web_contents); | 189 MetroPinTabHelper::CreateForWebContents(web_contents); |
190 #endif | 190 #endif |
191 | 191 |
192 // --- Feature tab helpers behind flags --- | 192 // --- Feature tab helpers behind flags --- |
193 | 193 |
194 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 194 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
195 CaptivePortalTabHelper::CreateForWebContents(web_contents); | 195 CaptivePortalTabHelper::CreateForWebContents(web_contents); |
196 #endif | 196 #endif |
(...skipping 20 matching lines...) Expand all Loading... |
217 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( | 217 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( |
218 web_contents); | 218 web_contents); |
219 } | 219 } |
220 | 220 |
221 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 221 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
222 web_contents->GetBrowserContext())) { | 222 web_contents->GetBrowserContext())) { |
223 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 223 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
224 web_contents); | 224 web_contents); |
225 } | 225 } |
226 } | 226 } |
OLD | NEW |