| 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 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 IDS_PRINT_PREVIEW_NO_ADVANCED_SETTINGS_MATCH_SEARCH_HINT); | 341 IDS_PRINT_PREVIEW_NO_ADVANCED_SETTINGS_MATCH_SEARCH_HINT); |
| 342 source->AddLocalizedString( | 342 source->AddLocalizedString( |
| 343 "advancedSettingsDialogConfirm", | 343 "advancedSettingsDialogConfirm", |
| 344 IDS_PRINT_PREVIEW_ADVANCED_SETTINGS_DIALOG_CONFIRM); | 344 IDS_PRINT_PREVIEW_ADVANCED_SETTINGS_DIALOG_CONFIRM); |
| 345 source->AddLocalizedString("cancel", IDS_CANCEL); | 345 source->AddLocalizedString("cancel", IDS_CANCEL); |
| 346 source->AddLocalizedString("advancedOptionsLabel", | 346 source->AddLocalizedString("advancedOptionsLabel", |
| 347 IDS_PRINT_PREVIEW_ADVANCED_OPTIONS_LABEL); | 347 IDS_PRINT_PREVIEW_ADVANCED_OPTIONS_LABEL); |
| 348 source->AddLocalizedString("showAdvancedOptions", | 348 source->AddLocalizedString("showAdvancedOptions", |
| 349 IDS_PRINT_PREVIEW_SHOW_ADVANCED_OPTIONS); | 349 IDS_PRINT_PREVIEW_SHOW_ADVANCED_OPTIONS); |
| 350 | 350 |
| 351 source->SetUseJsonJSFormatV2(); |
| 351 source->SetJsonPath("strings.js"); | 352 source->SetJsonPath("strings.js"); |
| 352 source->AddResourcePath("print_preview.js", IDR_PRINT_PREVIEW_JS); | 353 source->AddResourcePath("print_preview.js", IDR_PRINT_PREVIEW_JS); |
| 353 source->AddResourcePath("images/printer.png", | 354 source->AddResourcePath("images/printer.png", |
| 354 IDR_PRINT_PREVIEW_IMAGES_PRINTER); | 355 IDR_PRINT_PREVIEW_IMAGES_PRINTER); |
| 355 source->AddResourcePath("images/printer_shared.png", | 356 source->AddResourcePath("images/printer_shared.png", |
| 356 IDR_PRINT_PREVIEW_IMAGES_PRINTER_SHARED); | 357 IDR_PRINT_PREVIEW_IMAGES_PRINTER_SHARED); |
| 357 source->AddResourcePath("images/third_party.png", | 358 source->AddResourcePath("images/third_party.png", |
| 358 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY); | 359 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY); |
| 359 source->AddResourcePath("images/third_party_fedex.png", | 360 source->AddResourcePath("images/third_party_fedex.png", |
| 360 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY_FEDEX); | 361 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY_FEDEX); |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 } | 639 } |
| 639 | 640 |
| 640 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { | 641 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { |
| 641 handler_->FileSelected(path, 0, NULL); | 642 handler_->FileSelected(path, 0, NULL); |
| 642 } | 643 } |
| 643 | 644 |
| 644 void PrintPreviewUI::SetPdfSavedClosureForTesting( | 645 void PrintPreviewUI::SetPdfSavedClosureForTesting( |
| 645 const base::Closure& closure) { | 646 const base::Closure& closure) { |
| 646 handler_->SetPdfSavedClosureForTesting(closure); | 647 handler_->SetPdfSavedClosureForTesting(closure); |
| 647 } | 648 } |
| OLD | NEW |