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_data_source.h" | 5 #include "chrome/browser/ui/webui/print_preview/print_preview_data_source.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 AddLocalizedString("setupCloudPrinters", | 155 AddLocalizedString("setupCloudPrinters", |
156 IDS_PRINT_PREVIEW_SETUP_CLOUD_PRINTERS); | 156 IDS_PRINT_PREVIEW_SETUP_CLOUD_PRINTERS); |
157 AddLocalizedString("changeDestination", | 157 AddLocalizedString("changeDestination", |
158 IDS_PRINT_PREVIEW_CHANGE_DESTINATION); | 158 IDS_PRINT_PREVIEW_CHANGE_DESTINATION); |
159 AddLocalizedString("offlineForYear", IDS_PRINT_PREVIEW_OFFLINE_FOR_YEAR); | 159 AddLocalizedString("offlineForYear", IDS_PRINT_PREVIEW_OFFLINE_FOR_YEAR); |
160 AddLocalizedString("offlineForMonth", IDS_PRINT_PREVIEW_OFFLINE_FOR_MONTH); | 160 AddLocalizedString("offlineForMonth", IDS_PRINT_PREVIEW_OFFLINE_FOR_MONTH); |
161 AddLocalizedString("offlineForWeek", IDS_PRINT_PREVIEW_OFFLINE_FOR_WEEK); | 161 AddLocalizedString("offlineForWeek", IDS_PRINT_PREVIEW_OFFLINE_FOR_WEEK); |
162 AddLocalizedString("offline", IDS_PRINT_PREVIEW_OFFLINE); | 162 AddLocalizedString("offline", IDS_PRINT_PREVIEW_OFFLINE); |
163 AddLocalizedString("fedexTos", IDS_PRINT_PREVIEW_FEDEX_TOS); | 163 AddLocalizedString("fedexTos", IDS_PRINT_PREVIEW_FEDEX_TOS); |
164 AddLocalizedString("tosCheckboxLabel", IDS_PRINT_PREVIEW_TOS_CHECKBOX_LABEL); | 164 AddLocalizedString("tosCheckboxLabel", IDS_PRINT_PREVIEW_TOS_CHECKBOX_LABEL); |
| 165 AddLocalizedString("noDestsPromoTitle", |
| 166 IDS_PRINT_PREVIEW_NO_DESTS_PROMO_TITLE); |
| 167 AddLocalizedString("noDestsPromoBody", IDS_PRINT_PREVIEW_NO_DESTS_PROMO_BODY); |
| 168 AddLocalizedString("noDestsPromoGcpDesc", |
| 169 IDS_PRINT_PREVIEW_NO_DESTS_GCP_DESC); |
| 170 AddLocalizedString("noDestsPromoAddPrinterButtonLabel", |
| 171 IDS_PRINT_PREVIEW_NO_DESTS_PROMO_ADD_PRINTER_BUTTON_LABEL); |
| 172 AddLocalizedString("noDestsPromoNotNowButtonLabel", |
| 173 IDS_PRINT_PREVIEW_NO_DESTS_PROMO_NOT_NOW_BUTTON_LABEL); |
165 | 174 |
166 set_json_path("strings.js"); | 175 set_json_path("strings.js"); |
167 add_resource_path("print_preview.js", IDR_PRINT_PREVIEW_JS); | 176 add_resource_path("print_preview.js", IDR_PRINT_PREVIEW_JS); |
168 add_resource_path("images/printer.png", IDR_PRINT_PREVIEW_IMAGES_PRINTER); | 177 add_resource_path("images/printer.png", IDR_PRINT_PREVIEW_IMAGES_PRINTER); |
169 add_resource_path("images/printer_shared.png", | 178 add_resource_path("images/printer_shared.png", |
170 IDR_PRINT_PREVIEW_IMAGES_PRINTER_SHARED); | 179 IDR_PRINT_PREVIEW_IMAGES_PRINTER_SHARED); |
171 add_resource_path("images/third_party.png", | 180 add_resource_path("images/third_party.png", |
172 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY); | 181 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY); |
173 add_resource_path("images/google_doc.png", | 182 add_resource_path("images/google_doc.png", |
174 IDR_PRINT_PREVIEW_IMAGES_GOOGLE_DOC); | 183 IDR_PRINT_PREVIEW_IMAGES_GOOGLE_DOC); |
(...skipping 30 matching lines...) Expand all Loading... |
205 preview_ui_id, page_index, &data); | 214 preview_ui_id, page_index, &data); |
206 } | 215 } |
207 if (data.get()) { | 216 if (data.get()) { |
208 SendResponse(request_id, data); | 217 SendResponse(request_id, data); |
209 return; | 218 return; |
210 } | 219 } |
211 // Invalid request. | 220 // Invalid request. |
212 scoped_refptr<base::RefCountedBytes> empty_bytes(new base::RefCountedBytes); | 221 scoped_refptr<base::RefCountedBytes> empty_bytes(new base::RefCountedBytes); |
213 SendResponse(request_id, empty_bytes); | 222 SendResponse(request_id, empty_bytes); |
214 } | 223 } |
OLD | NEW |