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 24 matching lines...) Expand all Loading... |
35 #if defined(OS_ANDROID) | 35 #if defined(OS_ANDROID) |
36 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 36 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
37 #include "chrome/browser/ui/android/context_menu_helper.h" | 37 #include "chrome/browser/ui/android/context_menu_helper.h" |
38 #include "chrome/browser/ui/android/window_android_helper.h" | 38 #include "chrome/browser/ui/android/window_android_helper.h" |
39 #else | 39 #else |
40 #include "chrome/browser/external_protocol/external_protocol_observer.h" | 40 #include "chrome/browser/external_protocol/external_protocol_observer.h" |
41 #include "chrome/browser/net/predictor_tab_helper.h" | 41 #include "chrome/browser/net/predictor_tab_helper.h" |
42 #include "chrome/browser/plugins/plugin_observer.h" | 42 #include "chrome/browser/plugins/plugin_observer.h" |
43 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 43 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
44 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 44 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
| 45 #include "chrome/browser/ui/chrome_sad_tab_client.h" |
45 #include "chrome/browser/ui/hung_plugin_tab_helper.h" | 46 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
46 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" | 47 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" |
47 #include "chrome/browser/ui/sad_tab_helper.h" | |
48 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 48 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
49 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 49 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
50 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" | 50 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
51 #include "chrome/browser/ui/zoom/zoom_controller.h" | 51 #include "chrome/browser/ui/zoom/zoom_controller.h" |
52 #include "components/pdf/browser/pdf_web_contents_helper.h" | 52 #include "components/pdf/browser/pdf_web_contents_helper.h" |
| 53 #include "components/sad_tab/sad_tab_helper.h" |
53 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 54 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
54 #endif // defined(OS_ANDROID) | 55 #endif // defined(OS_ANDROID) |
55 | 56 |
56 #if defined(OS_WIN) | 57 #if defined(OS_WIN) |
57 #include "chrome/browser/ui/metro_pin_tab_helper_win.h" | 58 #include "chrome/browser/ui/metro_pin_tab_helper_win.h" |
58 #endif | 59 #endif |
59 | 60 |
60 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 61 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
61 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 62 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
62 #endif | 63 #endif |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); | 165 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); |
165 ExternalProtocolObserver::CreateForWebContents(web_contents); | 166 ExternalProtocolObserver::CreateForWebContents(web_contents); |
166 HungPluginTabHelper::CreateForWebContents(web_contents); | 167 HungPluginTabHelper::CreateForWebContents(web_contents); |
167 ManagePasswordsUIController::CreateForWebContents(web_contents); | 168 ManagePasswordsUIController::CreateForWebContents(web_contents); |
168 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( | 169 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( |
169 web_contents, | 170 web_contents, |
170 scoped_ptr<pdf::PDFWebContentsHelperClient>( | 171 scoped_ptr<pdf::PDFWebContentsHelperClient>( |
171 new ChromePDFWebContentsHelperClient())); | 172 new ChromePDFWebContentsHelperClient())); |
172 PermissionBubbleManager::CreateForWebContents(web_contents); | 173 PermissionBubbleManager::CreateForWebContents(web_contents); |
173 PluginObserver::CreateForWebContents(web_contents); | 174 PluginObserver::CreateForWebContents(web_contents); |
174 SadTabHelper::CreateForWebContents(web_contents); | 175 sad_tab::SadTabHelper::CreateForWebContentsWithClient( |
| 176 web_contents, scoped_ptr<sad_tab::SadTabClient>(new ChromeSadTabClient)); |
175 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); | 177 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); |
176 SearchEngineTabHelper::CreateForWebContents(web_contents); | 178 SearchEngineTabHelper::CreateForWebContents(web_contents); |
177 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); | 179 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); |
178 ThumbnailTabHelper::CreateForWebContents(web_contents); | 180 ThumbnailTabHelper::CreateForWebContents(web_contents); |
179 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); | 181 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); |
180 #endif | 182 #endif |
181 | 183 |
182 #if defined(OS_WIN) | 184 #if defined(OS_WIN) |
183 MetroPinTabHelper::CreateForWebContents(web_contents); | 185 MetroPinTabHelper::CreateForWebContents(web_contents); |
184 #endif | 186 #endif |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 if (OneClickSigninHelper::CanOffer(web_contents, | 223 if (OneClickSigninHelper::CanOffer(web_contents, |
222 OneClickSigninHelper::CAN_OFFER_FOR_ALL, | 224 OneClickSigninHelper::CAN_OFFER_FOR_ALL, |
223 std::string(), | 225 std::string(), |
224 NULL)) { | 226 NULL)) { |
225 OneClickSigninHelper::CreateForWebContentsWithPasswordManager( | 227 OneClickSigninHelper::CreateForWebContentsWithPasswordManager( |
226 web_contents, | 228 web_contents, |
227 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); | 229 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); |
228 } | 230 } |
229 #endif | 231 #endif |
230 } | 232 } |
OLD | NEW |