OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_data_source.h" | 5 #include "chrome/browser/ui/webui/print_preview_data_source.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #if defined(GOOGLE_CHROME_BUILD) | 44 #if defined(GOOGLE_CHROME_BUILD) |
45 AddString("noPlugin", l10n_util::GetStringFUTF16( | 45 AddString("noPlugin", l10n_util::GetStringFUTF16( |
46 IDS_PRINT_PREVIEW_NO_PLUGIN, ASCIIToUTF16("chrome://plugins/"))); | 46 IDS_PRINT_PREVIEW_NO_PLUGIN, ASCIIToUTF16("chrome://plugins/"))); |
47 #else | 47 #else |
48 AddLocalizedString("noPlugin", IDS_PRINT_PREVIEW_NO_PLUGIN); | 48 AddLocalizedString("noPlugin", IDS_PRINT_PREVIEW_NO_PLUGIN); |
49 #endif | 49 #endif |
50 AddLocalizedString("launchNativeDialog", IDS_PRINT_PREVIEW_NATIVE_DIALOG); | 50 AddLocalizedString("launchNativeDialog", IDS_PRINT_PREVIEW_NATIVE_DIALOG); |
51 AddLocalizedString("previewFailed", IDS_PRINT_PREVIEW_FAILED); | 51 AddLocalizedString("previewFailed", IDS_PRINT_PREVIEW_FAILED); |
52 AddLocalizedString("invalidPrinterSettings", | 52 AddLocalizedString("invalidPrinterSettings", |
53 IDS_PRINT_PREVIEW_INVALID_PRINTER_SETTINGS); | 53 IDS_PRINT_PREVIEW_INVALID_PRINTER_SETTINGS); |
| 54 AddLocalizedString("initiatorTabCrashed", |
| 55 IDS_PRINT_PREVIEW_INITIATOR_TAB_CRASHED); |
| 56 AddLocalizedString("initiatorTabClosed", |
| 57 IDS_PRINT_PREVIEW_INITIATOR_TAB_CLOSED); |
| 58 AddLocalizedString("reopenPage", IDS_PRINT_PREVIEW_REOPEN_PAGE); |
| 59 |
54 AddLocalizedString("printButton", IDS_PRINT_PREVIEW_PRINT_BUTTON); | 60 AddLocalizedString("printButton", IDS_PRINT_PREVIEW_PRINT_BUTTON); |
55 AddLocalizedString("cancelButton", IDS_PRINT_PREVIEW_CANCEL_BUTTON); | 61 AddLocalizedString("cancelButton", IDS_PRINT_PREVIEW_CANCEL_BUTTON); |
56 AddLocalizedString("printing", IDS_PRINT_PREVIEW_PRINTING); | 62 AddLocalizedString("printing", IDS_PRINT_PREVIEW_PRINTING); |
57 AddLocalizedString("printingToPDFInProgress", | 63 AddLocalizedString("printingToPDFInProgress", |
58 IDS_PRINT_PREVIEW_PRINTING_TO_PDF_IN_PROGRESS); | 64 IDS_PRINT_PREVIEW_PRINTING_TO_PDF_IN_PROGRESS); |
59 | 65 |
60 AddLocalizedString("destinationLabel", IDS_PRINT_PREVIEW_DESTINATION_LABEL); | 66 AddLocalizedString("destinationLabel", IDS_PRINT_PREVIEW_DESTINATION_LABEL); |
61 AddLocalizedString("copiesLabel", IDS_PRINT_PREVIEW_COPIES_LABEL); | 67 AddLocalizedString("copiesLabel", IDS_PRINT_PREVIEW_COPIES_LABEL); |
62 AddLocalizedString("examplePageRangeText", | 68 AddLocalizedString("examplePageRangeText", |
63 IDS_PRINT_PREVIEW_EXAMPLE_PAGE_RANGE_TEXT); | 69 IDS_PRINT_PREVIEW_EXAMPLE_PAGE_RANGE_TEXT); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 url_substr[0], page_index, &data); | 156 url_substr[0], page_index, &data); |
151 } | 157 } |
152 if (data.get()) { | 158 if (data.get()) { |
153 SendResponse(request_id, data); | 159 SendResponse(request_id, data); |
154 return; | 160 return; |
155 } | 161 } |
156 // Invalid request. | 162 // Invalid request. |
157 scoped_refptr<RefCountedBytes> empty_bytes(new RefCountedBytes); | 163 scoped_refptr<RefCountedBytes> empty_bytes(new RefCountedBytes); |
158 SendResponse(request_id, empty_bytes); | 164 SendResponse(request_id, empty_bytes); |
159 } | 165 } |
OLD | NEW |