| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 90 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
| 91 #endif | 91 #endif |
| 92 | 92 |
| 93 #if defined(ENABLE_EXTENSIONS) | 93 #if defined(ENABLE_EXTENSIONS) |
| 94 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" | 94 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" |
| 95 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" | 95 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
| 96 #include "chrome/browser/extensions/tab_helper.h" | 96 #include "chrome/browser/extensions/tab_helper.h" |
| 97 #include "extensions/browser/view_type_utils.h" | 97 #include "extensions/browser/view_type_utils.h" |
| 98 #endif | 98 #endif |
| 99 | 99 |
| 100 #if defined(ENABLE_SUPERVISED_USERS) | 100 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 101 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h" | 101 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h" |
| 102 #endif | 102 #endif |
| 103 | 103 |
| 104 #if defined(ENABLE_PRINTING) | 104 #if defined(ENABLE_PRINTING) |
| 105 #if defined(ENABLE_PRINT_PREVIEW) | 105 #if defined(ENABLE_PRINT_PREVIEW) |
| 106 #include "chrome/browser/printing/print_preview_message_handler.h" | 106 #include "chrome/browser/printing/print_preview_message_handler.h" |
| 107 #include "chrome/browser/printing/print_view_manager.h" | 107 #include "chrome/browser/printing/print_view_manager.h" |
| 108 #else | 108 #else |
| 109 #include "chrome/browser/printing/print_view_manager_basic.h" | 109 #include "chrome/browser/printing/print_view_manager_basic.h" |
| 110 #endif // defined(ENABLE_PRINT_PREVIEW) | 110 #endif // defined(ENABLE_PRINT_PREVIEW) |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 // --- Feature tab helpers behind flags --- | 240 // --- Feature tab helpers behind flags --- |
| 241 | 241 |
| 242 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) | 242 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| 243 CaptivePortalTabHelper::CreateForWebContents(web_contents); | 243 CaptivePortalTabHelper::CreateForWebContents(web_contents); |
| 244 #endif | 244 #endif |
| 245 | 245 |
| 246 #if defined(ENABLE_EXTENSIONS) | 246 #if defined(ENABLE_EXTENSIONS) |
| 247 extensions::TabHelper::CreateForWebContents(web_contents); | 247 extensions::TabHelper::CreateForWebContents(web_contents); |
| 248 #endif | 248 #endif |
| 249 | 249 |
| 250 #if defined(ENABLE_SUPERVISED_USERS) | 250 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 251 SupervisedUserNavigationObserver::CreateForWebContents(web_contents); | 251 SupervisedUserNavigationObserver::CreateForWebContents(web_contents); |
| 252 #endif | 252 #endif |
| 253 | 253 |
| 254 #if defined(ENABLE_PRINTING) && !BUILDFLAG(ANDROID_JAVA_UI) | 254 #if defined(ENABLE_PRINTING) && !BUILDFLAG(ANDROID_JAVA_UI) |
| 255 #if defined(ENABLE_PRINT_PREVIEW) | 255 #if defined(ENABLE_PRINT_PREVIEW) |
| 256 printing::PrintViewManager::CreateForWebContents(web_contents); | 256 printing::PrintViewManager::CreateForWebContents(web_contents); |
| 257 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); | 257 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); |
| 258 #else | 258 #else |
| 259 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); | 259 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); |
| 260 #endif // defined(ENABLE_PRINT_PREVIEW) | 260 #endif // defined(ENABLE_PRINT_PREVIEW) |
| 261 #endif // defined(ENABLE_PRINTING) && !BUILDFLAG(ANDROID_JAVA_UI) | 261 #endif // defined(ENABLE_PRINTING) && !BUILDFLAG(ANDROID_JAVA_UI) |
| 262 | 262 |
| 263 bool enabled_distiller = base::CommandLine::ForCurrentProcess()->HasSwitch( | 263 bool enabled_distiller = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 264 switches::kEnableDomDistiller); | 264 switches::kEnableDomDistiller); |
| 265 if (enabled_distiller) { | 265 if (enabled_distiller) { |
| 266 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( | 266 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( |
| 267 web_contents); | 267 web_contents); |
| 268 } | 268 } |
| 269 | 269 |
| 270 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 270 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
| 271 web_contents->GetBrowserContext())) { | 271 web_contents->GetBrowserContext())) { |
| 272 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 272 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
| 273 web_contents); | 273 web_contents); |
| 274 } | 274 } |
| 275 | 275 |
| 276 if (tracing::NavigationTracingObserver::IsEnabled()) | 276 if (tracing::NavigationTracingObserver::IsEnabled()) |
| 277 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 277 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
| 278 } | 278 } |
| OLD | NEW |