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/tab_specific_content_settings.h" | 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
10 #include "chrome/browser/favicon/favicon_tab_helper.h" | 10 #include "chrome/browser/favicon/favicon_tab_helper.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 #if defined(OS_ANDROID) | 37 #if defined(OS_ANDROID) |
38 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 38 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
39 #include "chrome/browser/ui/android/context_menu_helper.h" | 39 #include "chrome/browser/ui/android/context_menu_helper.h" |
40 #include "chrome/browser/ui/android/window_android_helper.h" | 40 #include "chrome/browser/ui/android/window_android_helper.h" |
41 #else | 41 #else |
42 #include "chrome/browser/external_protocol/external_protocol_observer.h" | 42 #include "chrome/browser/external_protocol/external_protocol_observer.h" |
43 #include "chrome/browser/net/predictor_tab_helper.h" | 43 #include "chrome/browser/net/predictor_tab_helper.h" |
44 #include "chrome/browser/plugins/plugin_observer.h" | 44 #include "chrome/browser/plugins/plugin_observer.h" |
45 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 45 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
46 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 46 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
| 47 #include "chrome/browser/ui/chrome_sad_tab_client.h" |
47 #include "chrome/browser/ui/hung_plugin_tab_helper.h" | 48 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
48 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" | 49 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" |
49 #include "chrome/browser/ui/sad_tab_helper.h" | |
50 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 50 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
51 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 51 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
52 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" | 52 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
53 #include "chrome/browser/ui/zoom/zoom_controller.h" | 53 #include "chrome/browser/ui/zoom/zoom_controller.h" |
54 #include "components/pdf/browser/pdf_web_contents_helper.h" | 54 #include "components/pdf/browser/pdf_web_contents_helper.h" |
| 55 #include "components/sad_tab/sad_tab_helper.h" |
55 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 56 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
56 #endif // defined(OS_ANDROID) | 57 #endif // defined(OS_ANDROID) |
57 | 58 |
58 #if defined(OS_WIN) | 59 #if defined(OS_WIN) |
59 #include "chrome/browser/ui/metro_pin_tab_helper_win.h" | 60 #include "chrome/browser/ui/metro_pin_tab_helper_win.h" |
60 #endif | 61 #endif |
61 | 62 |
62 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 63 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
63 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 64 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
64 #endif | 65 #endif |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); | 167 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); |
167 ExternalProtocolObserver::CreateForWebContents(web_contents); | 168 ExternalProtocolObserver::CreateForWebContents(web_contents); |
168 HungPluginTabHelper::CreateForWebContents(web_contents); | 169 HungPluginTabHelper::CreateForWebContents(web_contents); |
169 ManagePasswordsUIController::CreateForWebContents(web_contents); | 170 ManagePasswordsUIController::CreateForWebContents(web_contents); |
170 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( | 171 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( |
171 web_contents, | 172 web_contents, |
172 scoped_ptr<pdf::PDFWebContentsHelperClient>( | 173 scoped_ptr<pdf::PDFWebContentsHelperClient>( |
173 new ChromePDFWebContentsHelperClient())); | 174 new ChromePDFWebContentsHelperClient())); |
174 PermissionBubbleManager::CreateForWebContents(web_contents); | 175 PermissionBubbleManager::CreateForWebContents(web_contents); |
175 PluginObserver::CreateForWebContents(web_contents); | 176 PluginObserver::CreateForWebContents(web_contents); |
176 SadTabHelper::CreateForWebContents(web_contents); | 177 sad_tab::SadTabHelper::CreateForWebContentsWithClient( |
| 178 web_contents, scoped_ptr<sad_tab::SadTabClient>(new ChromeSadTabClient)); |
177 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); | 179 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); |
178 SearchEngineTabHelper::CreateForWebContents(web_contents); | 180 SearchEngineTabHelper::CreateForWebContents(web_contents); |
179 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); | 181 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); |
180 ThumbnailTabHelper::CreateForWebContents(web_contents); | 182 ThumbnailTabHelper::CreateForWebContents(web_contents); |
181 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); | 183 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); |
182 #endif | 184 #endif |
183 | 185 |
184 #if defined(OS_WIN) | 186 #if defined(OS_WIN) |
185 MetroPinTabHelper::CreateForWebContents(web_contents); | 187 MetroPinTabHelper::CreateForWebContents(web_contents); |
186 #endif | 188 #endif |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); | 231 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); |
230 } | 232 } |
231 #endif | 233 #endif |
232 | 234 |
233 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 235 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
234 web_contents->GetBrowserContext())) { | 236 web_contents->GetBrowserContext())) { |
235 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 237 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
236 web_contents); | 238 web_contents); |
237 } | 239 } |
238 } | 240 } |
OLD | NEW |