OLD | NEW |
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 | 8 |
9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 l10n_util::GetStringFUTF16( | 229 l10n_util::GetStringFUTF16( |
230 IDS_PRINT_PREVIEW_CLOUD_DIALOG_OPTION_NO_SHORTCUT, | 230 IDS_PRINT_PREVIEW_CLOUD_DIALOG_OPTION_NO_SHORTCUT, |
231 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); | 231 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); |
232 #if defined(OS_MACOSX) | 232 #if defined(OS_MACOSX) |
233 source->AddLocalizedString("openPdfInPreviewOption", | 233 source->AddLocalizedString("openPdfInPreviewOption", |
234 IDS_PRINT_PREVIEW_OPEN_PDF_IN_PREVIEW_APP); | 234 IDS_PRINT_PREVIEW_OPEN_PDF_IN_PREVIEW_APP); |
235 #endif | 235 #endif |
236 source->AddString( | 236 source->AddString( |
237 "printWithCloudPrintWait", | 237 "printWithCloudPrintWait", |
238 l10n_util::GetStringFUTF16( | 238 l10n_util::GetStringFUTF16( |
239 IDS_PRINT_PREVIEW_PRINT_WITH_CLOUD_PRINT_WAIT, | 239 IDS_PRINT_PREVIEW_PRINT_WITH_CLOUD_PRINT_WAIT, |
240 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); | 240 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); |
241 source->AddString( | 241 source->AddString( |
242 "noDestsPromoLearnMoreUrl", | 242 "noDestsPromoLearnMoreUrl", |
243 chrome::kCloudPrintNoDestinationsLearnMoreURL); | 243 chrome::kCloudPrintNoDestinationsLearnMoreURL); |
244 source->AddLocalizedString("pageRangeInstruction", | 244 source->AddLocalizedString("pageRangeInstruction", |
245 IDS_PRINT_PREVIEW_PAGE_RANGE_INSTRUCTION); | 245 IDS_PRINT_PREVIEW_PAGE_RANGE_INSTRUCTION); |
246 source->AddLocalizedString("copiesInstruction", | 246 source->AddLocalizedString("copiesInstruction", |
247 IDS_PRINT_PREVIEW_COPIES_INSTRUCTION); | 247 IDS_PRINT_PREVIEW_COPIES_INSTRUCTION); |
248 source->AddLocalizedString("incrementTitle", | 248 source->AddLocalizedString("incrementTitle", |
249 IDS_PRINT_PREVIEW_INCREMENT_TITLE); | 249 IDS_PRINT_PREVIEW_INCREMENT_TITLE); |
250 source->AddLocalizedString("decrementTitle", | 250 source->AddLocalizedString("decrementTitle", |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 } | 603 } |
604 | 604 |
605 void PrintPreviewUI::OnPrintPreviewScalingDisabled() { | 605 void PrintPreviewUI::OnPrintPreviewScalingDisabled() { |
606 web_ui()->CallJavascriptFunction("printScalingDisabledForSourcePDF"); | 606 web_ui()->CallJavascriptFunction("printScalingDisabledForSourcePDF"); |
607 } | 607 } |
608 | 608 |
609 // static | 609 // static |
610 void PrintPreviewUI::SetDelegateForTesting(TestingDelegate* delegate) { | 610 void PrintPreviewUI::SetDelegateForTesting(TestingDelegate* delegate) { |
611 g_testing_delegate = delegate; | 611 g_testing_delegate = delegate; |
612 } | 612 } |
OLD | NEW |