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

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

Issue 7003089: 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
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 17 matching lines...) Expand all
28 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_TITLE)); 28 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_TITLE));
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 localized_strings->SetString(std::string("launchNativeDialog"),
39 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_NATIVE_DIALOG));
38 #endif 40 #endif
39 localized_strings->SetString(std::string("previewFailed"), 41 localized_strings->SetString(std::string("previewFailed"),
40 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_FAILED)); 42 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_FAILED));
41 localized_strings->SetString(std::string("initiatorTabClosed"), 43 localized_strings->SetString(std::string("initiatorTabClosed"),
42 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_INITIATOR_TAB_CLOSED)); 44 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_INITIATOR_TAB_CLOSED));
43 localized_strings->SetString(std::string("reopenPage"), 45 localized_strings->SetString(std::string("reopenPage"),
44 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_REOPEN_PAGE)); 46 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_REOPEN_PAGE));
45 47
46 localized_strings->SetString(std::string("printButton"), 48 localized_strings->SetString(std::string("printButton"),
47 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PRINT_BUTTON)); 49 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PRINT_BUTTON));
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 SendResponse(request_id, empty_bytes); 157 SendResponse(request_id, empty_bytes);
156 return; 158 return;
157 } 159 }
158 } 160 }
159 161
160 std::string PrintPreviewDataSource::GetMimeType(const std::string& path) const { 162 std::string PrintPreviewDataSource::GetMimeType(const std::string& path) const {
161 if (path.empty()) 163 if (path.empty())
162 return "text/html"; // Print Preview Index Page. 164 return "text/html"; // Print Preview Index Page.
163 return "application/pdf"; // Print Preview data 165 return "application/pdf"; // Print Preview data
164 } 166 }
OLDNEW
« chrome/browser/resources/print_preview.js ('K') | « chrome/browser/resources/print_preview.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698