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 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 localized_strings->SetString(std::string("printPreviewPageLabelSingular"), | 97 localized_strings->SetString(std::string("printPreviewPageLabelSingular"), |
98 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_LABEL_SINGULAR)); | 98 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_LABEL_SINGULAR)); |
99 localized_strings->SetString(std::string("printPreviewPageLabelPlural"), | 99 localized_strings->SetString(std::string("printPreviewPageLabelPlural"), |
100 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_LABEL_PLURAL)); | 100 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_LABEL_PLURAL)); |
101 localized_strings->SetString(std::string("systemDialogOption"), | 101 localized_strings->SetString(std::string("systemDialogOption"), |
102 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_SYSTEM_DIALOG_OPTION)); | 102 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_SYSTEM_DIALOG_OPTION)); |
103 localized_strings->SetString(std::string("pageRangeInstruction"), | 103 localized_strings->SetString(std::string("pageRangeInstruction"), |
104 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_RANGE_INSTRUCTION)); | 104 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_RANGE_INSTRUCTION)); |
105 localized_strings->SetString(std::string("copiesInstruction"), | 105 localized_strings->SetString(std::string("copiesInstruction"), |
106 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_COPIES_INSTRUCTION)); | 106 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_COPIES_INSTRUCTION)); |
| 107 localized_strings->SetString(std::string("signIn"), |
| 108 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_SIGN_IN)); |
| 109 localized_strings->SetString(std::string("morePrinters"), |
| 110 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MORE_PRINTERS)); |
| 111 localized_strings->SetString(std::string("addCloudPrinter"), |
| 112 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_ADD_CLOUD_PRINTER)); |
| 113 localized_strings->SetString(std::string("cloudPrinters"), |
| 114 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_CLOUD_PRINTERS)); |
| 115 localized_strings->SetString(std::string("localPrinters"), |
| 116 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_LOCAL_PRINTERS)); |
| 117 localized_strings->SetString(std::string("manageCloudPrinters"), |
| 118 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_CLOUD_PRINTERS)); |
| 119 localized_strings->SetString(std::string("manageLocalPrinters"), |
| 120 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_LOCAL_PRINTERS)); |
107 localized_strings->SetString(std::string("managePrinters"), | 121 localized_strings->SetString(std::string("managePrinters"), |
108 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_PRINTERS)); | 122 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_PRINTERS)); |
109 localized_strings->SetString(std::string("incrementTitle"), | 123 localized_strings->SetString(std::string("incrementTitle"), |
110 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_INCREMENT_TITLE)); | 124 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_INCREMENT_TITLE)); |
111 localized_strings->SetString(std::string("decrementTitle"), | 125 localized_strings->SetString(std::string("decrementTitle"), |
112 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_DECREMENT_TITLE)); | 126 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_DECREMENT_TITLE)); |
113 localized_strings->SetString(std::string("printPagesLabel"), | 127 localized_strings->SetString(std::string("printPagesLabel"), |
114 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PRINT_PAGES_LABEL)); | 128 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PRINT_PAGES_LABEL)); |
115 } | 129 } |
116 | 130 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 SendResponse(request_id, empty_bytes); | 177 SendResponse(request_id, empty_bytes); |
164 return; | 178 return; |
165 } | 179 } |
166 } | 180 } |
167 | 181 |
168 std::string PrintPreviewDataSource::GetMimeType(const std::string& path) const { | 182 std::string PrintPreviewDataSource::GetMimeType(const std::string& path) const { |
169 if (path.empty()) | 183 if (path.empty()) |
170 return "text/html"; // Print Preview Index Page. | 184 return "text/html"; // Print Preview Index Page. |
171 return "application/pdf"; // Print Preview data | 185 return "application/pdf"; // Print Preview data |
172 } | 186 } |
OLD | NEW |