Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: chrome/browser/ui/webui/print_preview_data_source.cc

Issue 7108054: Revert 88611 - Print Preview: Changing displayed error message when PDF Viewer is missing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/print_preview.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 18 matching lines...) Expand all
29 localized_strings->SetString(std::string("loading"), 29 localized_strings->SetString(std::string("loading"),
30 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_LOADING)); 30 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_LOADING));
31 #if defined(GOOGLE_CHROME_BUILD) 31 #if defined(GOOGLE_CHROME_BUILD)
32 localized_strings->SetString(std::string("noPlugin"), 32 localized_strings->SetString(std::string("noPlugin"),
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("launchNativeDialog"),
40 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_NATIVE_DIALOG));
41 localized_strings->SetString(std::string("previewFailed"), 39 localized_strings->SetString(std::string("previewFailed"),
42 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_FAILED)); 40 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_FAILED));
43 localized_strings->SetString(std::string("initiatorTabClosed"), 41 localized_strings->SetString(std::string("initiatorTabClosed"),
44 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_INITIATOR_TAB_CLOSED)); 42 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_INITIATOR_TAB_CLOSED));
45 localized_strings->SetString(std::string("reopenPage"), 43 localized_strings->SetString(std::string("reopenPage"),
46 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_REOPEN_PAGE)); 44 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_REOPEN_PAGE));
47 45
48 localized_strings->SetString(std::string("printButton"), 46 localized_strings->SetString(std::string("printButton"),
49 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PRINT_BUTTON)); 47 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PRINT_BUTTON));
50 localized_strings->SetString(std::string("cancelButton"), 48 localized_strings->SetString(std::string("cancelButton"),
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 SendResponse(request_id, empty_bytes); 155 SendResponse(request_id, empty_bytes);
158 return; 156 return;
159 } 157 }
160 } 158 }
161 159
162 std::string PrintPreviewDataSource::GetMimeType(const std::string& path) const { 160 std::string PrintPreviewDataSource::GetMimeType(const std::string& path) const {
163 if (path.empty()) 161 if (path.empty())
164 return "text/html"; // Print Preview Index Page. 162 return "text/html"; // Print Preview Index Page.
165 return "application/pdf"; // Print Preview data 163 return "application/pdf"; // Print Preview data
166 } 164 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698