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

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

Issue 1006583003: Add title property to chrome.printerProvider pritn job (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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_handler.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 base::string16 title; 908 base::string16 title;
909 scoped_refptr<base::RefCountedBytes> data; 909 scoped_refptr<base::RefCountedBytes> data;
910 if (!GetPreviewDataAndTitle(&data, &title)) { 910 if (!GetPreviewDataAndTitle(&data, &title)) {
911 LOG(ERROR) << "Nothing to print; no preview available."; 911 LOG(ERROR) << "Nothing to print; no preview available.";
912 OnExtensionPrintResult(false, "NO_DATA"); 912 OnExtensionPrintResult(false, "NO_DATA");
913 return; 913 return;
914 } 914 }
915 915
916 EnsureExtensionPrinterHandlerSet(); 916 EnsureExtensionPrinterHandlerSet();
917 extension_printer_handler_->StartPrint( 917 extension_printer_handler_->StartPrint(
918 destination_id, capabilities, print_ticket, gfx::Size(width, height), 918 destination_id, capabilities, title, print_ticket,
919 data, base::Bind(&PrintPreviewHandler::OnExtensionPrintResult, 919 gfx::Size(width, height), data,
920 base::Unretained(this))); 920 base::Bind(&PrintPreviewHandler::OnExtensionPrintResult,
921 base::Unretained(this)));
921 return; 922 return;
922 } 923 }
923 924
924 scoped_refptr<base::RefCountedBytes> data; 925 scoped_refptr<base::RefCountedBytes> data;
925 base::string16 title; 926 base::string16 title;
926 if (!GetPreviewDataAndTitle(&data, &title)) { 927 if (!GetPreviewDataAndTitle(&data, &title)) {
927 // Nothing to print, no preview available. 928 // Nothing to print, no preview available.
928 return; 929 return;
929 } 930 }
930 931
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 1713
1713 void PrintPreviewHandler::UnregisterForMergeSession() { 1714 void PrintPreviewHandler::UnregisterForMergeSession() {
1714 if (reconcilor_) 1715 if (reconcilor_)
1715 reconcilor_->RemoveMergeSessionObserver(this); 1716 reconcilor_->RemoveMergeSessionObserver(this);
1716 } 1717 }
1717 1718
1718 void PrintPreviewHandler::SetPdfSavedClosureForTesting( 1719 void PrintPreviewHandler::SetPdfSavedClosureForTesting(
1719 const base::Closure& closure) { 1720 const base::Closure& closure) {
1720 pdf_file_saved_closure_ = closure; 1721 pdf_file_saved_closure_ = closure;
1721 } 1722 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698