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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 source->AddLocalizedString("noDestsPromoGcpDesc", | 313 source->AddLocalizedString("noDestsPromoGcpDesc", |
314 IDS_PRINT_PREVIEW_NO_DESTS_GCP_DESC); | 314 IDS_PRINT_PREVIEW_NO_DESTS_GCP_DESC); |
315 source->AddLocalizedString("learnMore", | 315 source->AddLocalizedString("learnMore", |
316 IDS_LEARN_MORE); | 316 IDS_LEARN_MORE); |
317 source->AddLocalizedString( | 317 source->AddLocalizedString( |
318 "noDestsPromoAddPrinterButtonLabel", | 318 "noDestsPromoAddPrinterButtonLabel", |
319 IDS_PRINT_PREVIEW_NO_DESTS_PROMO_ADD_PRINTER_BUTTON_LABEL); | 319 IDS_PRINT_PREVIEW_NO_DESTS_PROMO_ADD_PRINTER_BUTTON_LABEL); |
320 source->AddLocalizedString( | 320 source->AddLocalizedString( |
321 "noDestsPromoNotNowButtonLabel", | 321 "noDestsPromoNotNowButtonLabel", |
322 IDS_PRINT_PREVIEW_NO_DESTS_PROMO_NOT_NOW_BUTTON_LABEL); | 322 IDS_PRINT_PREVIEW_NO_DESTS_PROMO_NOT_NOW_BUTTON_LABEL); |
| 323 source->AddLocalizedString("couldNotPrint", |
| 324 IDS_PRINT_PREVIEW_COULD_NOT_PRINT); |
323 | 325 |
324 source->SetJsonPath("strings.js"); | 326 source->SetJsonPath("strings.js"); |
325 source->AddResourcePath("print_preview.js", IDR_PRINT_PREVIEW_JS); | 327 source->AddResourcePath("print_preview.js", IDR_PRINT_PREVIEW_JS); |
326 source->AddResourcePath("images/printer.png", | 328 source->AddResourcePath("images/printer.png", |
327 IDR_PRINT_PREVIEW_IMAGES_PRINTER); | 329 IDR_PRINT_PREVIEW_IMAGES_PRINTER); |
328 source->AddResourcePath("images/printer_shared.png", | 330 source->AddResourcePath("images/printer_shared.png", |
329 IDR_PRINT_PREVIEW_IMAGES_PRINTER_SHARED); | 331 IDR_PRINT_PREVIEW_IMAGES_PRINTER_SHARED); |
330 source->AddResourcePath("images/third_party.png", | 332 source->AddResourcePath("images/third_party.png", |
331 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY); | 333 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY); |
332 source->AddResourcePath("images/third_party_fedex.png", | 334 source->AddResourcePath("images/third_party_fedex.png", |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 } | 595 } |
594 | 596 |
595 void PrintPreviewUI::OnPrintPreviewScalingDisabled() { | 597 void PrintPreviewUI::OnPrintPreviewScalingDisabled() { |
596 web_ui()->CallJavascriptFunction("printScalingDisabledForSourcePDF"); | 598 web_ui()->CallJavascriptFunction("printScalingDisabledForSourcePDF"); |
597 } | 599 } |
598 | 600 |
599 // static | 601 // static |
600 void PrintPreviewUI::SetDelegateForTesting(TestingDelegate* delegate) { | 602 void PrintPreviewUI::SetDelegateForTesting(TestingDelegate* delegate) { |
601 g_testing_delegate = delegate; | 603 g_testing_delegate = delegate; |
602 } | 604 } |
OLD | NEW |