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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "chrome/browser/net/predictor_tab_helper.h" | 45 #include "chrome/browser/net/predictor_tab_helper.h" |
46 #include "chrome/browser/plugins/plugin_observer.h" | 46 #include "chrome/browser/plugins/plugin_observer.h" |
47 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 47 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
48 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 48 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
49 #include "chrome/browser/ui/hung_plugin_tab_helper.h" | 49 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
50 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" | 50 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" |
51 #include "chrome/browser/ui/sad_tab_helper.h" | 51 #include "chrome/browser/ui/sad_tab_helper.h" |
52 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 52 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
53 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 53 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
54 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" | 54 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
55 #include "chrome/browser/ui/zoom/zoom_controller.h" | |
56 #include "components/pdf/browser/pdf_web_contents_helper.h" | 55 #include "components/pdf/browser/pdf_web_contents_helper.h" |
| 56 #include "components/ui/zoom/zoom_controller.h" |
57 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 57 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
58 #endif // defined(OS_ANDROID) | 58 #endif // defined(OS_ANDROID) |
59 | 59 |
60 #if defined(OS_WIN) | 60 #if defined(OS_WIN) |
61 #include "chrome/browser/ui/metro_pin_tab_helper_win.h" | 61 #include "chrome/browser/ui/metro_pin_tab_helper_win.h" |
62 #endif | 62 #endif |
63 | 63 |
64 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 64 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
65 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 65 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
66 #endif | 66 #endif |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 #endif | 116 #endif |
117 | 117 |
118 // Create all the tab helpers. | 118 // Create all the tab helpers. |
119 | 119 |
120 // SessionTabHelper comes first because it sets up the tab ID, and other | 120 // SessionTabHelper comes first because it sets up the tab ID, and other |
121 // helpers may rely on that. | 121 // helpers may rely on that. |
122 SessionTabHelper::CreateForWebContents(web_contents); | 122 SessionTabHelper::CreateForWebContents(web_contents); |
123 #if !defined(OS_ANDROID) | 123 #if !defined(OS_ANDROID) |
124 // ZoomController comes before common tab helpers since ChromeAutofillClient | 124 // ZoomController comes before common tab helpers since ChromeAutofillClient |
125 // may want to register as a ZoomObserver with it. | 125 // may want to register as a ZoomObserver with it. |
126 ZoomController::CreateForWebContents(web_contents); | 126 ui_zoom::ZoomController::CreateForWebContents(web_contents); |
127 #endif | 127 #endif |
128 | 128 |
129 // --- Common tab helpers --- | 129 // --- Common tab helpers --- |
130 | 130 |
131 autofill::ChromeAutofillClient::CreateForWebContents(web_contents); | 131 autofill::ChromeAutofillClient::CreateForWebContents(web_contents); |
132 autofill::ContentAutofillDriverFactory::CreateForWebContentsAndDelegate( | 132 autofill::ContentAutofillDriverFactory::CreateForWebContentsAndDelegate( |
133 web_contents, | 133 web_contents, |
134 autofill::ChromeAutofillClient::FromWebContents(web_contents), | 134 autofill::ChromeAutofillClient::FromWebContents(web_contents), |
135 g_browser_process->GetApplicationLocale(), | 135 g_browser_process->GetApplicationLocale(), |
136 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); | 136 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 OneClickSigninHelper::CreateForWebContents(web_contents); | 231 OneClickSigninHelper::CreateForWebContents(web_contents); |
232 } | 232 } |
233 #endif | 233 #endif |
234 | 234 |
235 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 235 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
236 web_contents->GetBrowserContext())) { | 236 web_contents->GetBrowserContext())) { |
237 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 237 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
238 web_contents); | 238 web_contents); |
239 } | 239 } |
240 } | 240 } |
OLD | NEW |