summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/print_web_view_helper.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 03:29:21 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 03:29:21 +0000
commit47c7ec8be8c6829d7973568fe453f46046c2e818 (patch)
tree23858ca98d528e15b669d0d8d384fb66e934e450 /chrome/renderer/print_web_view_helper.cc
parent8ec5cf2ac8e296fcd264599f4a72cb108d40764a (diff)
downloadchromium_src-47c7ec8be8c6829d7973568fe453f46046c2e818.zip
chromium_src-47c7ec8be8c6829d7973568fe453f46046c2e818.tar.gz
chromium_src-47c7ec8be8c6829d7973568fe453f46046c2e818.tar.bz2
Print Preview: Add a non-user-visible pref for controlling print preview. Hook it up to the print preview switches. We will hook up enterprise policy to this in a separate CL.
BUG=102863 TEST=none Review URL: http://codereview.chromium.org/9139045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118025 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/print_web_view_helper.cc')
-rw-r--r--chrome/renderer/print_web_view_helper.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc
index 66e6d73..ec12341 100644
--- a/chrome/renderer/print_web_view_helper.cc
+++ b/chrome/renderer/print_web_view_helper.cc
@@ -462,6 +462,11 @@ PrintMsg_Print_Params CalculatePrintParamsForCss(
return result_params;
}
+bool IsPrintPreviewEnabled() {
+ return CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kRendererPrintPreview);
+}
+
} // namespace
// static - Not anonymous so that platform implementations can use it.
@@ -647,7 +652,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view)
: content::RenderViewObserver(render_view),
content::RenderViewObserverTracker<PrintWebViewHelper>(render_view),
print_web_view_(NULL),
- is_preview_enabled_(switches::IsPrintPreviewEnabled()),
+ is_preview_enabled_(IsPrintPreviewEnabled()),
is_print_ready_metafile_sent_(false),
ignore_css_margins_(false),
fit_to_page_(true),