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

Side by Side 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: Change to match new Pdfium API 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/webui/print_preview/print_preview_ui.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 source->AddLocalizedString("optionsLabel", IDS_PRINT_PREVIEW_OPTIONS_LABEL); 271 source->AddLocalizedString("optionsLabel", IDS_PRINT_PREVIEW_OPTIONS_LABEL);
272 source->AddLocalizedString("optionHeaderFooter", 272 source->AddLocalizedString("optionHeaderFooter",
273 IDS_PRINT_PREVIEW_OPTION_HEADER_FOOTER); 273 IDS_PRINT_PREVIEW_OPTION_HEADER_FOOTER);
274 source->AddLocalizedString("optionFitToPage", 274 source->AddLocalizedString("optionFitToPage",
275 IDS_PRINT_PREVIEW_OPTION_FIT_TO_PAGE); 275 IDS_PRINT_PREVIEW_OPTION_FIT_TO_PAGE);
276 source->AddLocalizedString( 276 source->AddLocalizedString(
277 "optionBackgroundColorsAndImages", 277 "optionBackgroundColorsAndImages",
278 IDS_PRINT_PREVIEW_OPTION_BACKGROUND_COLORS_AND_IMAGES); 278 IDS_PRINT_PREVIEW_OPTION_BACKGROUND_COLORS_AND_IMAGES);
279 source->AddLocalizedString("optionSelectionOnly", 279 source->AddLocalizedString("optionSelectionOnly",
280 IDS_PRINT_PREVIEW_OPTION_SELECTION_ONLY); 280 IDS_PRINT_PREVIEW_OPTION_SELECTION_ONLY);
281 source->AddLocalizedString("optionRasterize",
282 IDS_PRINT_PREVIEW_OPTION_RASTERIZE);
281 source->AddLocalizedString("marginsLabel", IDS_PRINT_PREVIEW_MARGINS_LABEL); 283 source->AddLocalizedString("marginsLabel", IDS_PRINT_PREVIEW_MARGINS_LABEL);
282 source->AddLocalizedString("defaultMargins", 284 source->AddLocalizedString("defaultMargins",
283 IDS_PRINT_PREVIEW_DEFAULT_MARGINS); 285 IDS_PRINT_PREVIEW_DEFAULT_MARGINS);
284 source->AddLocalizedString("noMargins", IDS_PRINT_PREVIEW_NO_MARGINS); 286 source->AddLocalizedString("noMargins", IDS_PRINT_PREVIEW_NO_MARGINS);
285 source->AddLocalizedString("customMargins", IDS_PRINT_PREVIEW_CUSTOM_MARGINS); 287 source->AddLocalizedString("customMargins", IDS_PRINT_PREVIEW_CUSTOM_MARGINS);
286 source->AddLocalizedString("minimumMargins", 288 source->AddLocalizedString("minimumMargins",
287 IDS_PRINT_PREVIEW_MINIMUM_MARGINS); 289 IDS_PRINT_PREVIEW_MINIMUM_MARGINS);
288 source->AddLocalizedString("top", IDS_PRINT_PREVIEW_TOP_MARGIN_LABEL); 290 source->AddLocalizedString("top", IDS_PRINT_PREVIEW_TOP_MARGIN_LABEL);
289 source->AddLocalizedString("bottom", IDS_PRINT_PREVIEW_BOTTOM_MARGIN_LABEL); 291 source->AddLocalizedString("bottom", IDS_PRINT_PREVIEW_BOTTOM_MARGIN_LABEL);
290 source->AddLocalizedString("left", IDS_PRINT_PREVIEW_LEFT_MARGIN_LABEL); 292 source->AddLocalizedString("left", IDS_PRINT_PREVIEW_LEFT_MARGIN_LABEL);
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 } 689 }
688 690
689 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { 691 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) {
690 handler_->FileSelected(path, 0, NULL); 692 handler_->FileSelected(path, 0, NULL);
691 } 693 }
692 694
693 void PrintPreviewUI::SetPdfSavedClosureForTesting( 695 void PrintPreviewUI::SetPdfSavedClosureForTesting(
694 const base::Closure& closure) { 696 const base::Closure& closure) {
695 handler_->SetPdfSavedClosureForTesting(closure); 697 handler_->SetPdfSavedClosureForTesting(closure);
696 } 698 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698