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

Unified Diff: chrome/renderer/printing/print_web_view_helper.cc

Issue 375253002: [Chrome] Support NumCopies print preset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/printing/print_web_view_helper.cc
diff --git a/chrome/renderer/printing/print_web_view_helper.cc b/chrome/renderer/printing/print_web_view_helper.cc
index 1da901d7b8af953062ff14b68286808ca545fcb4..5848d0d0a2c0f9bd7bd7b0ea4533b6913e99082b 100644
--- a/chrome/renderer/printing/print_web_view_helper.cc
+++ b/chrome/renderer/printing/print_web_view_helper.cc
@@ -1033,6 +1033,14 @@ void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
Send(new PrintHostMsg_PrintPreviewScalingDisabled(routing_id()));
}
+ // FIXME: Is this right approach?
+ // Send a message to browser if number of copies to be printed information is
Vitaly Buka (NO REVIEWS) 2014/07/10 01:13:05 Should be inside of: if (print_pages_params_->para
+ // available.
+ int num_copies = print_preview_context_.source_frame()->getNumCopiesForPlugin(
+ print_preview_context_.source_node());
+ if (print_pages_params_->params.is_first_request && num_copies)
+ Send(new PrintHostMsg_PrintPreviewNumCopies(routing_id(), num_copies));
Nikhil 2014/07/09 09:36:47 Is this right approach?
Vitaly Buka (NO REVIEWS) 2014/07/10 01:13:05 yes
+
is_print_ready_metafile_sent_ = false;
// PDF printer device supports alpha blending.

Powered by Google App Engine
This is Rietveld 408576698