Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Side by Side Diff: chrome/browser/ui/tab_helpers.cc

Issue 1419063002: Displaying "simplify page" on print preview by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Correcting histograms.xml Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/native_layer.js ('k') | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698