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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.cc

Issue 2760753002: [CUPS] Implement the local CUPS printer setup waiting UI. (Closed)
Patch Set: Address dpapad@ and thestig@'s comments. Created 3 years, 8 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
« no previous file with comments | « chrome/browser/resources/print_preview/search/destination_search.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/print_preview_ui.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 source->AddLocalizedString("selectButton", 228 source->AddLocalizedString("selectButton",
229 IDS_PRINT_PREVIEW_BUTTON_SELECT); 229 IDS_PRINT_PREVIEW_BUTTON_SELECT);
230 source->AddLocalizedString("goBackButton", 230 source->AddLocalizedString("goBackButton",
231 IDS_PRINT_PREVIEW_BUTTON_GO_BACK); 231 IDS_PRINT_PREVIEW_BUTTON_GO_BACK);
232 source->AddLocalizedString( 232 source->AddLocalizedString(
233 "resolveExtensionUSBPermissionMessage", 233 "resolveExtensionUSBPermissionMessage",
234 IDS_PRINT_PREVIEW_RESOLVE_EXTENSION_USB_PERMISSION_MESSAGE); 234 IDS_PRINT_PREVIEW_RESOLVE_EXTENSION_USB_PERMISSION_MESSAGE);
235 source->AddLocalizedString( 235 source->AddLocalizedString(
236 "resolveExtensionUSBErrorMessage", 236 "resolveExtensionUSBErrorMessage",
237 IDS_PRINT_PREVIEW_RESOLVE_EXTENSION_USB_ERROR_MESSAGE); 237 IDS_PRINT_PREVIEW_RESOLVE_EXTENSION_USB_ERROR_MESSAGE);
238 source->AddLocalizedString(
239 "resolveCrosPrinterMessage",
240 IDS_PRINT_PREVIEW_RESOLVE_CROS_DESTINATION_MESSAGE);
241 const base::string16 shortcut_text(base::UTF8ToUTF16(kBasicPrintShortcut)); 238 const base::string16 shortcut_text(base::UTF8ToUTF16(kBasicPrintShortcut));
242 #if !defined(OS_CHROMEOS) 239 #if !defined(OS_CHROMEOS)
Lei Zhang 2017/03/30 23:26:02 Add the new strings here and change this to #if /
xdai1 2017/03/30 23:33:21 Done.
243 source->AddString( 240 source->AddString(
244 "systemDialogOption", 241 "systemDialogOption",
245 l10n_util::GetStringFUTF16( 242 l10n_util::GetStringFUTF16(
246 IDS_PRINT_PREVIEW_SYSTEM_DIALOG_OPTION, 243 IDS_PRINT_PREVIEW_SYSTEM_DIALOG_OPTION,
247 shortcut_text)); 244 shortcut_text));
248 #endif 245 #endif
249 #if defined(OS_MACOSX) 246 #if defined(OS_MACOSX)
250 source->AddLocalizedString("openPdfInPreviewOption", 247 source->AddLocalizedString("openPdfInPreviewOption",
251 IDS_PRINT_PREVIEW_OPEN_PDF_IN_PREVIEW_APP); 248 IDS_PRINT_PREVIEW_OPEN_PDF_IN_PREVIEW_APP);
252 #endif 249 #endif
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 IDS_PRINT_PREVIEW_SHOW_ADVANCED_OPTIONS); 371 IDS_PRINT_PREVIEW_SHOW_ADVANCED_OPTIONS);
375 372
376 source->AddLocalizedString("accept", IDS_PRINT_PREVIEW_ACCEPT_INVITE); 373 source->AddLocalizedString("accept", IDS_PRINT_PREVIEW_ACCEPT_INVITE);
377 source->AddLocalizedString( 374 source->AddLocalizedString(
378 "acceptForGroup", IDS_PRINT_PREVIEW_ACCEPT_GROUP_INVITE); 375 "acceptForGroup", IDS_PRINT_PREVIEW_ACCEPT_GROUP_INVITE);
379 source->AddLocalizedString("reject", IDS_PRINT_PREVIEW_REJECT_INVITE); 376 source->AddLocalizedString("reject", IDS_PRINT_PREVIEW_REJECT_INVITE);
380 source->AddLocalizedString( 377 source->AddLocalizedString(
381 "groupPrinterSharingInviteText", IDS_PRINT_PREVIEW_GROUP_INVITE_TEXT); 378 "groupPrinterSharingInviteText", IDS_PRINT_PREVIEW_GROUP_INVITE_TEXT);
382 source->AddLocalizedString( 379 source->AddLocalizedString(
383 "printerSharingInviteText", IDS_PRINT_PREVIEW_INVITE_TEXT); 380 "printerSharingInviteText", IDS_PRINT_PREVIEW_INVITE_TEXT);
381 #if defined(OS_CHROMEOS)
382 source->AddLocalizedString("configuringInProgressText",
383 IDS_PRINT_CONFIGURING_IN_PROGRESS_TEXT);
384 source->AddLocalizedString("configuringFailedText",
385 IDS_PRINT_CONFIGURING_FAILED_TEXT);
386 #endif
384 387
385 source->SetJsonPath("strings.js"); 388 source->SetJsonPath("strings.js");
386 source->AddResourcePath("print_preview.js", IDR_PRINT_PREVIEW_JS); 389 source->AddResourcePath("print_preview.js", IDR_PRINT_PREVIEW_JS);
387 source->AddResourcePath("pdf_preview.html", 390 source->AddResourcePath("pdf_preview.html",
388 IDR_PRINT_PREVIEW_PDF_PREVIEW_HTML); 391 IDR_PRINT_PREVIEW_PDF_PREVIEW_HTML);
389 source->AddResourcePath("images/printer.png", 392 source->AddResourcePath("images/printer.png",
390 IDR_PRINT_PREVIEW_IMAGES_PRINTER); 393 IDR_PRINT_PREVIEW_IMAGES_PRINTER);
391 source->AddResourcePath("images/printer_shared.png", 394 source->AddResourcePath("images/printer_shared.png",
392 IDR_PRINT_PREVIEW_IMAGES_PRINTER_SHARED); 395 IDR_PRINT_PREVIEW_IMAGES_PRINTER_SHARED);
393 source->AddResourcePath("images/business.svg", 396 source->AddResourcePath("images/business.svg",
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 692 }
690 693
691 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { 694 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) {
692 handler_->FileSelected(path, 0, NULL); 695 handler_->FileSelected(path, 0, NULL);
693 } 696 }
694 697
695 void PrintPreviewUI::SetPdfSavedClosureForTesting( 698 void PrintPreviewUI::SetPdfSavedClosureForTesting(
696 const base::Closure& closure) { 699 const base::Closure& closure) {
697 handler_->SetPdfSavedClosureForTesting(closure); 700 handler_->SetPdfSavedClosureForTesting(closure);
698 } 701 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/search/destination_search.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698