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

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

Issue 1125343004: Add a "Simplify Page" option to the print preview dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for the failing tests Created 5 years, 4 months 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 ad53e9a6d0fa99bb48a3be9ef8e87351eba8b065..f075900d928d4d352be1f609f46b4c271b9ec08c 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -251,6 +251,8 @@ content::WebUIDataSource* CreatePrintPreviewUISource() {
source->AddLocalizedString("printPagesLabel",
IDS_PRINT_PREVIEW_PRINT_PAGES_LABEL);
source->AddLocalizedString("optionsLabel", IDS_PRINT_PREVIEW_OPTIONS_LABEL);
+ source->AddLocalizedString("optionDistillPage",
+ IDS_PRINT_PREVIEW_OPTION_DISTILL_PAGE);
source->AddLocalizedString("optionHeaderFooter",
IDS_PRINT_PREVIEW_OPTION_HEADER_FOOTER);
source->AddLocalizedString("optionFitToPage",
@@ -396,7 +398,8 @@ PrintPreviewUI::PrintPreviewUI(content::WebUI* web_ui)
handler_(NULL),
source_is_modifiable_(true),
source_has_selection_(false),
- dialog_closed_(false) {
+ dialog_closed_(false),
+ weak_ptr_factory_(this) {
// Set up the chrome://print/ data source.
Profile* profile = Profile::FromWebUI(web_ui);
content::WebUIDataSource::Add(profile, CreatePrintPreviewUISource());
@@ -661,3 +664,7 @@ void PrintPreviewUI::SetPdfSavedClosureForTesting(
const base::Closure& closure) {
handler_->SetPdfSavedClosureForTesting(closure);
}
+
+base::WeakPtr<PrintPreviewUI> PrintPreviewUI::GetWeakPtr() {
+ return weak_ptr_factory_.GetWeakPtr();
+}

Powered by Google App Engine
This is Rietveld 408576698