Chromium Code Reviews| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 158 PDFTabHelper::CreateForWebContents(web_contents); | 158 PDFTabHelper::CreateForWebContents(web_contents); |
| 159 PermissionBubbleManager::CreateForWebContents(web_contents); | 159 PermissionBubbleManager::CreateForWebContents(web_contents); |
| 160 PluginObserver::CreateForWebContents(web_contents); | 160 PluginObserver::CreateForWebContents(web_contents); |
| 161 SadTabHelper::CreateForWebContents(web_contents); | 161 SadTabHelper::CreateForWebContents(web_contents); |
| 162 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); | 162 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); |
| 163 SearchEngineTabHelper::CreateForWebContents(web_contents); | 163 SearchEngineTabHelper::CreateForWebContents(web_contents); |
| 164 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); | 164 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); |
| 165 ThumbnailTabHelper::CreateForWebContents(web_contents); | 165 ThumbnailTabHelper::CreateForWebContents(web_contents); |
| 166 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); | 166 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); |
| 167 ZoomController::CreateForWebContents(web_contents); | 167 ZoomController::CreateForWebContents(web_contents); |
| 168 // The ChromeAutofillClient is also a ZoomObserver, so we connect it to the | |
| 169 // ZoomController here. Since both are WebContentsObservers they cannot be | |
| 170 // dependant on their order of destruction: ZoomController silently clears | |
| 171 // its ZoomObserver list during WebContentsDestroyed() so there's no need | |
| 172 // for the ChromeAutofillClient to remove itself as an observer. | |
| 173 ZoomController::FromWebContents(web_contents)->AddObserver( | |
| 174 autofill::ChromeAutofillClient::FromWebContents(web_contents)); | |
|
Avi (use Gerrit)
2014/07/10 14:59:53
:(
I would much rather move ZoomController before
| |
| 168 #endif | 175 #endif |
| 169 | 176 |
| 170 #if defined(OS_WIN) | 177 #if defined(OS_WIN) |
| 171 MetroPinTabHelper::CreateForWebContents(web_contents); | 178 MetroPinTabHelper::CreateForWebContents(web_contents); |
| 172 #endif | 179 #endif |
| 173 | 180 |
| 174 // --- Feature tab helpers behind flags --- | 181 // --- Feature tab helpers behind flags --- |
| 175 | 182 |
| 176 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 183 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| 177 CaptivePortalTabHelper::CreateForWebContents(web_contents); | 184 CaptivePortalTabHelper::CreateForWebContents(web_contents); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 if (OneClickSigninHelper::CanOffer(web_contents, | 216 if (OneClickSigninHelper::CanOffer(web_contents, |
| 210 OneClickSigninHelper::CAN_OFFER_FOR_ALL, | 217 OneClickSigninHelper::CAN_OFFER_FOR_ALL, |
| 211 std::string(), | 218 std::string(), |
| 212 NULL)) { | 219 NULL)) { |
| 213 OneClickSigninHelper::CreateForWebContentsWithPasswordManager( | 220 OneClickSigninHelper::CreateForWebContentsWithPasswordManager( |
| 214 web_contents, | 221 web_contents, |
| 215 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); | 222 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); |
| 216 } | 223 } |
| 217 #endif | 224 #endif |
| 218 } | 225 } |
| OLD | NEW |