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 21 matching lines...) Expand all Loading... |
32 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 32 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
33 #include "chrome/browser/ui/tab_dialogs.h" | 33 #include "chrome/browser/ui/tab_dialogs.h" |
34 #include "chrome/common/chrome_switches.h" | 34 #include "chrome/common/chrome_switches.h" |
35 #include "components/autofill/content/browser/content_autofill_driver_factory.h" | 35 #include "components/autofill/content/browser/content_autofill_driver_factory.h" |
36 #include "components/autofill/core/browser/autofill_manager.h" | 36 #include "components/autofill/core/browser/autofill_manager.h" |
37 #include "components/dom_distiller/content/web_contents_main_frame_observer.h" | 37 #include "components/dom_distiller/content/web_contents_main_frame_observer.h" |
38 #include "components/password_manager/core/browser/password_manager.h" | 38 #include "components/password_manager/core/browser/password_manager.h" |
39 #include "content/public/browser/web_contents.h" | 39 #include "content/public/browser/web_contents.h" |
40 | 40 |
41 #if defined(OS_ANDROID) | 41 #if defined(OS_ANDROID) |
| 42 #include "chrome/browser/android/voice_search_tab_helper.h" |
42 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 43 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
43 #include "chrome/browser/enhanced_bookmarks/android/enhanced_bookmark_tab_helper
.h" | 44 #include "chrome/browser/enhanced_bookmarks/android/enhanced_bookmark_tab_helper
.h" |
44 #include "chrome/browser/ui/android/context_menu_helper.h" | 45 #include "chrome/browser/ui/android/context_menu_helper.h" |
45 #include "chrome/browser/ui/android/window_android_helper.h" | 46 #include "chrome/browser/ui/android/window_android_helper.h" |
46 #else | 47 #else |
47 #include "chrome/browser/external_protocol/external_protocol_observer.h" | 48 #include "chrome/browser/external_protocol/external_protocol_observer.h" |
48 #include "chrome/browser/plugins/plugin_observer.h" | 49 #include "chrome/browser/plugins/plugin_observer.h" |
49 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 50 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
50 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 51 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
51 #include "chrome/browser/ui/hung_plugin_tab_helper.h" | 52 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // TODO(vabr): Remove TabSpecificContentSettings from here once their function | 155 // TODO(vabr): Remove TabSpecificContentSettings from here once their function |
155 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 | 156 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 |
156 TabSpecificContentSettings::CreateForWebContents(web_contents); | 157 TabSpecificContentSettings::CreateForWebContents(web_contents); |
157 | 158 |
158 // --- Platform-specific tab helpers --- | 159 // --- Platform-specific tab helpers --- |
159 | 160 |
160 #if defined(OS_ANDROID) | 161 #if defined(OS_ANDROID) |
161 ContextMenuHelper::CreateForWebContents(web_contents); | 162 ContextMenuHelper::CreateForWebContents(web_contents); |
162 EnhancedBookmarkTabHelper::CreateForWebContents(web_contents); | 163 EnhancedBookmarkTabHelper::CreateForWebContents(web_contents); |
163 SingleTabModeTabHelper::CreateForWebContents(web_contents); | 164 SingleTabModeTabHelper::CreateForWebContents(web_contents); |
| 165 VoiceSearchTabHelper::CreateForWebContents(web_contents); |
164 WindowAndroidHelper::CreateForWebContents(web_contents); | 166 WindowAndroidHelper::CreateForWebContents(web_contents); |
165 #else | 167 #else |
166 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( | 168 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( |
167 web_contents); | 169 web_contents); |
168 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); | 170 extensions::WebNavigationTabObserver::CreateForWebContents(web_contents); |
169 ExternalProtocolObserver::CreateForWebContents(web_contents); | 171 ExternalProtocolObserver::CreateForWebContents(web_contents); |
170 HungPluginTabHelper::CreateForWebContents(web_contents); | 172 HungPluginTabHelper::CreateForWebContents(web_contents); |
171 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( | 173 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( |
172 web_contents, | 174 web_contents, |
173 scoped_ptr<pdf::PDFWebContentsHelperClient>( | 175 scoped_ptr<pdf::PDFWebContentsHelperClient>( |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( | 217 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( |
216 web_contents); | 218 web_contents); |
217 } | 219 } |
218 | 220 |
219 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 221 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
220 web_contents->GetBrowserContext())) { | 222 web_contents->GetBrowserContext())) { |
221 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 223 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
222 web_contents); | 224 web_contents); |
223 } | 225 } |
224 } | 226 } |
OLD | NEW |