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

Unified Diff: chrome/browser/resources/print_preview/print_preview.js

Issue 8428005: Print Preview: Making margin selection sticky (part 1/2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 9 years, 2 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/browser/resources/print_preview/print_preview.js
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index fc50be43f5ab56f6fce857282266503693a67f8a..c88f46424f2614b8daa34b13042babc0e08c4558 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -574,9 +574,13 @@ function fileSelectionCompleted() {
* Set the default printer. If there is one, generate a print preview.
* @param {string} printer Name of the default printer. Empty if none.
* @param {string} cloudPrintData Cloud print related data to restore if
- * the default printer is a cloud printer.
+ * the default printer is a cloud printer.
+ * @param {number} lastUsedMarginsType Indicates the last used margins type
+ * (matches enum MarginType in printing/print_job_constants.h.
*/
-function setDefaultPrinter(printer_name, cloudPrintData) {
+function setDefaultPrinter(printer_name, cloudPrintData, lastUsedMarginsType) {
+ // Setting the margin selection to the last used one.
+ marginSettings.setLastUsedMarginsType(lastUsedMarginsType);
// Add a placeholder value so the printer list looks valid.
addDestinationListOption('', '', true, true, true);
if (printer_name) {
« no previous file with comments | « chrome/browser/resources/print_preview/margin_settings.js ('k') | chrome/browser/ui/webui/print_preview_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698