| 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/banners/app_banner_manager_desktop.h" |
| 8 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/content_settings/chrome_content_settings_client.h" | 10 #include "chrome/browser/content_settings/chrome_content_settings_client.h" |
| 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 11 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 11 #include "chrome/browser/engagement/site_engagement_helper.h" | 12 #include "chrome/browser/engagement/site_engagement_helper.h" |
| 12 #include "chrome/browser/engagement/site_engagement_service.h" | 13 #include "chrome/browser/engagement/site_engagement_service.h" |
| 13 #include "chrome/browser/external_protocol/external_protocol_observer.h" | 14 #include "chrome/browser/external_protocol/external_protocol_observer.h" |
| 14 #include "chrome/browser/favicon/favicon_helper.h" | 15 #include "chrome/browser/favicon/favicon_helper.h" |
| 15 #include "chrome/browser/history/history_tab_helper.h" | 16 #include "chrome/browser/history/history_tab_helper.h" |
| 16 #include "chrome/browser/history/top_sites_factory.h" | 17 #include "chrome/browser/history/top_sites_factory.h" |
| 17 #include "chrome/browser/infobars/infobar_service.h" | 18 #include "chrome/browser/infobars/infobar_service.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 TabDialogs::CreateForWebContents(web_contents); | 195 TabDialogs::CreateForWebContents(web_contents); |
| 195 ThumbnailTabHelper::CreateForWebContents(web_contents); | 196 ThumbnailTabHelper::CreateForWebContents(web_contents); |
| 196 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); | 197 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); |
| 197 #endif | 198 #endif |
| 198 ExternalProtocolObserver::CreateForWebContents(web_contents); | 199 ExternalProtocolObserver::CreateForWebContents(web_contents); |
| 199 | 200 |
| 200 #if defined(OS_WIN) | 201 #if defined(OS_WIN) |
| 201 MetroPinTabHelper::CreateForWebContents(web_contents); | 202 MetroPinTabHelper::CreateForWebContents(web_contents); |
| 202 #endif | 203 #endif |
| 203 | 204 |
| 205 #if !defined(OS_ANDROID) |
| 206 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 207 switches::kEnableAddToShelf)) { |
| 208 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents); |
| 209 } |
| 210 #endif |
| 211 |
| 204 // --- Feature tab helpers behind flags --- | 212 // --- Feature tab helpers behind flags --- |
| 205 | 213 |
| 206 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 214 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| 207 CaptivePortalTabHelper::CreateForWebContents(web_contents); | 215 CaptivePortalTabHelper::CreateForWebContents(web_contents); |
| 208 #endif | 216 #endif |
| 209 | 217 |
| 210 #if defined(ENABLE_EXTENSIONS) | 218 #if defined(ENABLE_EXTENSIONS) |
| 211 extensions::TabHelper::CreateForWebContents(web_contents); | 219 extensions::TabHelper::CreateForWebContents(web_contents); |
| 212 #endif | 220 #endif |
| 213 | 221 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 229 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( | 237 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( |
| 230 web_contents); | 238 web_contents); |
| 231 } | 239 } |
| 232 | 240 |
| 233 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 241 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
| 234 web_contents->GetBrowserContext())) { | 242 web_contents->GetBrowserContext())) { |
| 235 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 243 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
| 236 web_contents); | 244 web_contents); |
| 237 } | 245 } |
| 238 } | 246 } |
| OLD | NEW |