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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.cc

Issue 2524143003: Print Preview: Add option to rasterize PDFs and add JPEG compression. (Closed)
Patch Set: Clean up JS Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/print_preview/print_preview_ui.cc
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index e1f286abcc707dc5649b500402f214e7e69a8b52..cc8bbd8ae079fe87ccb21a8f230462cb315205f3 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -278,6 +278,8 @@ content::WebUIDataSource* CreatePrintPreviewUISource() {
IDS_PRINT_PREVIEW_OPTION_BACKGROUND_COLORS_AND_IMAGES);
source->AddLocalizedString("optionSelectionOnly",
IDS_PRINT_PREVIEW_OPTION_SELECTION_ONLY);
+ source->AddLocalizedString("optionRasterize",
+ IDS_PRINT_PREVIEW_OPTION_RASTERIZE);
source->AddLocalizedString("marginsLabel", IDS_PRINT_PREVIEW_MARGINS_LABEL);
source->AddLocalizedString("defaultMargins",
IDS_PRINT_PREVIEW_DEFAULT_MARGINS);
@@ -410,6 +412,10 @@ content::WebUIDataSource* CreatePrintPreviewUISource() {
bool scaling_enabled = base::FeatureList::IsEnabled(features::kPrintScaling);
source->AddBoolean("scalingEnabled", scaling_enabled);
+ bool print_pdf_as_image_enabled = base::FeatureList::IsEnabled(
+ features::kPrintPdfAsImage);
+ source->AddBoolean("printPdfAsImageEnabled", print_pdf_as_image_enabled);
+
#if defined(OS_CHROMEOS)
bool cups_and_md_settings_enabled =
base::CommandLine::ForCurrentProcess()->HasSwitch(

Powered by Google App Engine
This is Rietveld 408576698