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

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

Issue 7038028: Initial support for cloudprint in print preview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Lint! 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 localized_strings->SetString(std::string("printPreviewPageLabelSingular"), 95 localized_strings->SetString(std::string("printPreviewPageLabelSingular"),
96 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_LABEL_SINGULAR)); 96 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_LABEL_SINGULAR));
97 localized_strings->SetString(std::string("printPreviewPageLabelPlural"), 97 localized_strings->SetString(std::string("printPreviewPageLabelPlural"),
98 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_LABEL_PLURAL)); 98 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_LABEL_PLURAL));
99 localized_strings->SetString(std::string("systemDialogOption"), 99 localized_strings->SetString(std::string("systemDialogOption"),
100 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_SYSTEM_DIALOG_OPTION)); 100 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_SYSTEM_DIALOG_OPTION));
101 localized_strings->SetString(std::string("pageRangeInstruction"), 101 localized_strings->SetString(std::string("pageRangeInstruction"),
102 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_RANGE_INSTRUCTION)); 102 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_PAGE_RANGE_INSTRUCTION));
103 localized_strings->SetString(std::string("copiesInstruction"), 103 localized_strings->SetString(std::string("copiesInstruction"),
104 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_COPIES_INSTRUCTION)); 104 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_COPIES_INSTRUCTION));
105 localized_strings->SetString(std::string("signIn"),
106 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_SIGN_IN));
107 localized_strings->SetString(std::string("morePrinters"),
108 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MORE_PRINTERS));
109 localized_strings->SetString(std::string("addCloudPrinter"),
110 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_ADD_CLOUD_PRINTER));
111 localized_strings->SetString(std::string("cloudPrinters"),
112 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_CLOUD_PRINTERS));
113 localized_strings->SetString(std::string("localPrinters"),
114 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_LOCAL_PRINTERS));
115 localized_strings->SetString(std::string("manageCloudPrinters"),
116 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_CLOUD_PRINTERS));
117 localized_strings->SetString(std::string("manageLocalPrinters"),
118 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_LOCAL_PRINTERS));
105 localized_strings->SetString(std::string("managePrinters"), 119 localized_strings->SetString(std::string("managePrinters"),
106 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_PRINTERS)); 120 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_MANAGE_PRINTERS));
107 } 121 }
108 122
109 } // namespace 123 } // namespace
110 124
111 PrintPreviewDataSource::PrintPreviewDataSource() 125 PrintPreviewDataSource::PrintPreviewDataSource()
112 : DataSource(chrome::kChromeUIPrintHost, MessageLoop::current()) { 126 : DataSource(chrome::kChromeUIPrintHost, MessageLoop::current()) {
113 } 127 }
114 128
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 SendResponse(request_id, empty_bytes); 169 SendResponse(request_id, empty_bytes);
156 return; 170 return;
157 } 171 }
158 } 172 }
159 173
160 std::string PrintPreviewDataSource::GetMimeType(const std::string& path) const { 174 std::string PrintPreviewDataSource::GetMimeType(const std::string& path) const {
161 if (path.empty()) 175 if (path.empty())
162 return "text/html"; // Print Preview Index Page. 176 return "text/html"; // Print Preview Index Page.
163 return "application/pdf"; // Print Preview data 177 return "application/pdf"; // Print Preview data
164 } 178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698