| 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();
|
| +}
|
|
|