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/extensions/tab_helper.h" | 10 #include "chrome/browser/extensions/tab_helper.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 Profile* profile = | 112 Profile* profile = |
113 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 113 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
114 | 114 |
115 // SessionTabHelper comes first because it sets up the tab ID, and other | 115 // SessionTabHelper comes first because it sets up the tab ID, and other |
116 // helpers may rely on that. | 116 // helpers may rely on that. |
117 SessionTabHelper::CreateForWebContents(web_contents); | 117 SessionTabHelper::CreateForWebContents(web_contents); |
118 | 118 |
119 // --- Common tab helpers --- | 119 // --- Common tab helpers --- |
120 | 120 |
| 121 ChromePasswordManagerClient::CreateForWebContents(web_contents); |
| 122 |
121 AlternateErrorPageTabObserver::CreateForWebContents(web_contents); | 123 AlternateErrorPageTabObserver::CreateForWebContents(web_contents); |
122 autofill::TabAutofillManagerDelegate::CreateForWebContents(web_contents); | 124 autofill::TabAutofillManagerDelegate::CreateForWebContents(web_contents); |
123 autofill::AutofillDriverImpl::CreateForWebContentsAndDelegate( | 125 autofill::AutofillDriverImpl::CreateForWebContentsAndDelegate( |
124 web_contents, | 126 web_contents, |
125 autofill::TabAutofillManagerDelegate::FromWebContents(web_contents), | 127 autofill::TabAutofillManagerDelegate::FromWebContents(web_contents), |
| 128 ChromePasswordManagerClient::FromWebContents(web_contents)->GetDriver(), |
126 g_browser_process->GetApplicationLocale(), | 129 g_browser_process->GetApplicationLocale(), |
127 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); | 130 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); |
128 BookmarkTabHelper::CreateForWebContents(web_contents); | 131 BookmarkTabHelper::CreateForWebContents(web_contents); |
129 chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents); | 132 chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents); |
130 CoreTabHelper::CreateForWebContents(web_contents); | 133 CoreTabHelper::CreateForWebContents(web_contents); |
131 extensions::TabHelper::CreateForWebContents(web_contents); | 134 extensions::TabHelper::CreateForWebContents(web_contents); |
132 FaviconTabHelper::CreateForWebContents(web_contents); | 135 FaviconTabHelper::CreateForWebContents(web_contents); |
133 FindTabHelper::CreateForWebContents(web_contents); | 136 FindTabHelper::CreateForWebContents(web_contents); |
134 HistoryTabHelper::CreateForWebContents(web_contents); | 137 HistoryTabHelper::CreateForWebContents(web_contents); |
135 InfoBarService::CreateForWebContents(web_contents); | 138 InfoBarService::CreateForWebContents(web_contents); |
136 NavigationMetricsRecorder::CreateForWebContents(web_contents); | 139 NavigationMetricsRecorder::CreateForWebContents(web_contents); |
137 ChromePasswordManagerClient::CreateForWebContents(web_contents); | |
138 PopupBlockerTabHelper::CreateForWebContents(web_contents); | 140 PopupBlockerTabHelper::CreateForWebContents(web_contents); |
139 PrefsTabHelper::CreateForWebContents(web_contents); | 141 PrefsTabHelper::CreateForWebContents(web_contents); |
140 prerender::PrerenderTabHelper::CreateForWebContentsWithPasswordManager( | 142 prerender::PrerenderTabHelper::CreateForWebContentsWithPasswordManager( |
141 web_contents, | 143 web_contents, |
142 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); | 144 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); |
143 SSLTabHelper::CreateForWebContents(web_contents); | 145 SSLTabHelper::CreateForWebContents(web_contents); |
144 TabSpecificContentSettings::CreateForWebContents(web_contents); | 146 TabSpecificContentSettings::CreateForWebContents(web_contents); |
145 TranslateTabHelper::CreateForWebContents(web_contents); | 147 TranslateTabHelper::CreateForWebContents(web_contents); |
146 | 148 |
147 // --- Platform-specific tab helpers --- | 149 // --- Platform-specific tab helpers --- |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 if (OneClickSigninHelper::CanOffer(web_contents, | 207 if (OneClickSigninHelper::CanOffer(web_contents, |
206 OneClickSigninHelper::CAN_OFFER_FOR_ALL, | 208 OneClickSigninHelper::CAN_OFFER_FOR_ALL, |
207 std::string(), | 209 std::string(), |
208 NULL)) { | 210 NULL)) { |
209 OneClickSigninHelper::CreateForWebContentsWithPasswordManager( | 211 OneClickSigninHelper::CreateForWebContentsWithPasswordManager( |
210 web_contents, | 212 web_contents, |
211 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); | 213 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); |
212 } | 214 } |
213 #endif | 215 #endif |
214 } | 216 } |
OLD | NEW |