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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 localized_strings->SetString(std::string("manageLocalPrinters"), | 119 localized_strings->SetString(std::string("manageLocalPrinters"), |
120 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_LOCAL_PRINTERS)); | 120 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_LOCAL_PRINTERS)); |
121 localized_strings->SetString(std::string("managePrinters"), | 121 localized_strings->SetString(std::string("managePrinters"), |
122 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_PRINTERS)); | 122 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_PRINTERS)); |
123 localized_strings->SetString(std::string("incrementTitle"), | 123 localized_strings->SetString(std::string("incrementTitle"), |
124 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_INCREMENT_TITLE)); | 124 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_INCREMENT_TITLE)); |
125 localized_strings->SetString(std::string("decrementTitle"), | 125 localized_strings->SetString(std::string("decrementTitle"), |
126 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_DECREMENT_TITLE)); | 126 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_DECREMENT_TITLE)); |
127 localized_strings->SetString(std::string("printPagesLabel"), | 127 localized_strings->SetString(std::string("printPagesLabel"), |
128 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PRINT_PAGES_LABEL)); | 128 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PRINT_PAGES_LABEL)); |
| 129 localized_strings->SetString(std::string("optionsLabel"), |
| 130 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_OPTIONS_LABEL)); |
| 131 localized_strings->SetString(std::string("optionHeaderFooter"), |
| 132 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_OPTION_HEADER_FOOTER)); |
129 } | 133 } |
130 | 134 |
131 } // namespace | 135 } // namespace |
132 | 136 |
133 PrintPreviewDataSource::PrintPreviewDataSource() | 137 PrintPreviewDataSource::PrintPreviewDataSource() |
134 : DataSource(chrome::kChromeUIPrintHost, MessageLoop::current()) { | 138 : DataSource(chrome::kChromeUIPrintHost, MessageLoop::current()) { |
135 } | 139 } |
136 | 140 |
137 PrintPreviewDataSource::~PrintPreviewDataSource() { | 141 PrintPreviewDataSource::~PrintPreviewDataSource() { |
138 } | 142 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 SendResponse(request_id, empty_bytes); | 181 SendResponse(request_id, empty_bytes); |
178 return; | 182 return; |
179 } | 183 } |
180 } | 184 } |
181 | 185 |
182 std::string PrintPreviewDataSource::GetMimeType(const std::string& path) const { | 186 std::string PrintPreviewDataSource::GetMimeType(const std::string& path) const { |
183 if (path.empty()) | 187 if (path.empty()) |
184 return "text/html"; // Print Preview Index Page. | 188 return "text/html"; // Print Preview Index Page. |
185 return "application/pdf"; // Print Preview data | 189 return "application/pdf"; // Print Preview data |
186 } | 190 } |
OLD | NEW |