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 "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/content_settings/chrome_content_settings_client.h" | 10 #include "chrome/browser/content_settings/chrome_content_settings_client.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 #include "chrome/browser/plugins/plugin_observer.h" | 65 #include "chrome/browser/plugins/plugin_observer.h" |
66 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 66 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
67 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 67 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
68 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 68 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
69 #include "chrome/browser/ui/hung_plugin_tab_helper.h" | 69 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
70 #include "chrome/browser/ui/sad_tab_helper.h" | 70 #include "chrome/browser/ui/sad_tab_helper.h" |
71 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 71 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
72 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 72 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
73 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" | 73 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
74 #include "components/pdf/browser/pdf_web_contents_helper.h" | 74 #include "components/pdf/browser/pdf_web_contents_helper.h" |
75 #include "components/ui/zoom/zoom_controller.h" | |
76 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 75 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 76 #include "components/zoom/zoom_controller.h" |
77 #endif // BUILDFLAG(ANDROID_JAVA_UI) | 77 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
78 | 78 |
79 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 79 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
80 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 80 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
81 #endif | 81 #endif |
82 | 82 |
83 #if defined(ENABLE_EXTENSIONS) | 83 #if defined(ENABLE_EXTENSIONS) |
84 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" | 84 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" |
85 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" | 85 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
86 #include "chrome/browser/extensions/tab_helper.h" | 86 #include "chrome/browser/extensions/tab_helper.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 #endif | 128 #endif |
129 | 129 |
130 // Create all the tab helpers. | 130 // Create all the tab helpers. |
131 | 131 |
132 // SessionTabHelper comes first because it sets up the tab ID, and other | 132 // SessionTabHelper comes first because it sets up the tab ID, and other |
133 // helpers may rely on that. | 133 // helpers may rely on that. |
134 SessionTabHelper::CreateForWebContents(web_contents); | 134 SessionTabHelper::CreateForWebContents(web_contents); |
135 #if !BUILDFLAG(ANDROID_JAVA_UI) | 135 #if !BUILDFLAG(ANDROID_JAVA_UI) |
136 // ZoomController comes before common tab helpers since ChromeAutofillClient | 136 // ZoomController comes before common tab helpers since ChromeAutofillClient |
137 // may want to register as a ZoomObserver with it. | 137 // may want to register as a ZoomObserver with it. |
138 ui_zoom::ZoomController::CreateForWebContents(web_contents); | 138 zoom::ZoomController::CreateForWebContents(web_contents); |
139 #endif | 139 #endif |
140 | 140 |
141 // --- Common tab helpers --- | 141 // --- Common tab helpers --- |
142 | 142 |
143 autofill::ChromeAutofillClient::CreateForWebContents(web_contents); | 143 autofill::ChromeAutofillClient::CreateForWebContents(web_contents); |
144 autofill::ContentAutofillDriverFactory::CreateForWebContentsAndDelegate( | 144 autofill::ContentAutofillDriverFactory::CreateForWebContentsAndDelegate( |
145 web_contents, | 145 web_contents, |
146 autofill::ChromeAutofillClient::FromWebContents(web_contents), | 146 autofill::ChromeAutofillClient::FromWebContents(web_contents), |
147 g_browser_process->GetApplicationLocale(), | 147 g_browser_process->GetApplicationLocale(), |
148 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); | 148 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 253 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
254 web_contents->GetBrowserContext())) { | 254 web_contents->GetBrowserContext())) { |
255 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 255 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
256 web_contents); | 256 web_contents); |
257 } | 257 } |
258 | 258 |
259 if (tracing::NavigationTracingObserver::IsEnabled()) | 259 if (tracing::NavigationTracingObserver::IsEnabled()) |
260 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 260 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
261 } | 261 } |
OLD | NEW |