| 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_ui_html_source.h" | 5 #include "chrome/browser/ui/webui/print_preview_ui_html_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 22 matching lines...) Expand all Loading... |
| 33 l10n_util::GetStringFUTF8(IDS_PRINT_PREVIEW_NO_PLUGIN, | 33 l10n_util::GetStringFUTF8(IDS_PRINT_PREVIEW_NO_PLUGIN, |
| 34 ASCIIToUTF16("chrome://plugins/"))); | 34 ASCIIToUTF16("chrome://plugins/"))); |
| 35 #else | 35 #else |
| 36 localized_strings->SetString(std::string("noPlugin"), | 36 localized_strings->SetString(std::string("noPlugin"), |
| 37 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_NO_PLUGIN)); | 37 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_NO_PLUGIN)); |
| 38 #endif | 38 #endif |
| 39 localized_strings->SetString(std::string("previewFailed"), | 39 localized_strings->SetString(std::string("previewFailed"), |
| 40 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_FAILED)); | 40 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_FAILED)); |
| 41 localized_strings->SetString(std::string("initiatorTabClosed"), | 41 localized_strings->SetString(std::string("initiatorTabClosed"), |
| 42 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_INITIATOR_TAB_CLOSED)); | 42 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_INITIATOR_TAB_CLOSED)); |
| 43 localized_strings->SetString(std::string("reopenPage"), |
| 44 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_REOPEN_PAGE)); |
| 43 | 45 |
| 44 localized_strings->SetString(std::string("printButton"), | 46 localized_strings->SetString(std::string("printButton"), |
| 45 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PRINT_BUTTON)); | 47 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PRINT_BUTTON)); |
| 46 localized_strings->SetString(std::string("cancelButton"), | 48 localized_strings->SetString(std::string("cancelButton"), |
| 47 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_CANCEL_BUTTON)); | 49 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_CANCEL_BUTTON)); |
| 48 | 50 |
| 49 localized_strings->SetString(std::string("destinationLabel"), | 51 localized_strings->SetString(std::string("destinationLabel"), |
| 50 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_DESTINATION_LABEL)); | 52 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_DESTINATION_LABEL)); |
| 51 localized_strings->SetString(std::string("copiesLabel"), | 53 localized_strings->SetString(std::string("copiesLabel"), |
| 52 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_COPIES_LABEL)); | 54 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_COPIES_LABEL)); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 171 } |
| 170 | 172 |
| 171 std::string PrintPreviewUIHTMLSource::GetMimeType( | 173 std::string PrintPreviewUIHTMLSource::GetMimeType( |
| 172 const std::string& path) const { | 174 const std::string& path) const { |
| 173 // Print Preview Index page. | 175 // Print Preview Index page. |
| 174 if (path.empty()) | 176 if (path.empty()) |
| 175 return "text/html"; | 177 return "text/html"; |
| 176 // Print Preview data. | 178 // Print Preview data. |
| 177 return "application/pdf"; | 179 return "application/pdf"; |
| 178 } | 180 } |
| OLD | NEW |