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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.cc

Issue 407733002: [JS Changes] Support NumCopies print preset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback (nit fixes for test case) Created 6 years 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
« no previous file with comments | « chrome/browser/resources/print_preview/print_preview.js ('k') | chrome/test/data/webui/print_preview.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview/print_preview_ui.cc
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index 7d9e944f4f7085e870f77e415761fb18a490753b..e57942941d168f3a65a7f65b19e1cb56f889c383 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -628,9 +628,11 @@ void PrintPreviewUI::OnReloadPrintersList() {
void PrintPreviewUI::OnSetOptionsFromDocument(
const PrintHostMsg_SetOptionsFromDocument_Params& params) {
- // Notify WebUI that print scaling is disabled
- if (params.is_scaling_disabled)
- web_ui()->CallJavascriptFunction("printScalingDisabledForSourcePDF");
+ base::DictionaryValue options;
+ options.SetBoolean(printing::kSettingDisableScaling,
+ params.is_scaling_disabled);
+ options.SetInteger(printing::kSettingCopies, params.copies);
+ web_ui()->CallJavascriptFunction("printPresetOptionsFromDocument", options);
}
// static
« no previous file with comments | « chrome/browser/resources/print_preview/print_preview.js ('k') | chrome/test/data/webui/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698