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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID) | 232 #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID) |
233 #if defined(ENABLE_PRINT_PREVIEW) | 233 #if defined(ENABLE_PRINT_PREVIEW) |
234 printing::PrintViewManager::CreateForWebContents(web_contents); | 234 printing::PrintViewManager::CreateForWebContents(web_contents); |
235 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); | 235 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); |
236 #else | 236 #else |
237 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); | 237 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); |
238 #endif // defined(ENABLE_PRINT_PREVIEW) | 238 #endif // defined(ENABLE_PRINT_PREVIEW) |
239 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID) | 239 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID) |
240 | 240 |
241 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 241 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
242 switches::kEnableDomDistiller)) { | 242 switches::kEnableDomDistiller) || |
| 243 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 244 switches::kDisablePrintPreviewSimplify)) { |
243 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( | 245 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( |
244 web_contents); | 246 web_contents); |
245 } | 247 } |
246 | 248 |
247 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 249 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
248 web_contents->GetBrowserContext())) { | 250 web_contents->GetBrowserContext())) { |
249 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 251 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
250 web_contents); | 252 web_contents); |
251 } | 253 } |
252 | 254 |
253 if (tracing::NavigationTracingObserver::IsEnabled()) | 255 if (tracing::NavigationTracingObserver::IsEnabled()) |
254 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); | 256 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); |
255 } | 257 } |
OLD | NEW |