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

Side by Side Diff: chrome/browser/resources/print_preview/native_layer.js

Issue 974183003: Print Preview: Support the duplex preset in PDFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tsepez comments 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
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/print_preview.js » ('j') | 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 cr.exportPath('print_preview'); 5 cr.exportPath('print_preview');
6 6
7 /** 7 /**
8 * @typedef {{selectSaveAsPdfDestination: boolean, 8 * @typedef {{selectSaveAsPdfDestination: boolean,
9 * layoutSettings.portrait: boolean, 9 * layoutSettings.portrait: boolean,
10 * pageRange: string, 10 * pageRange: string,
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 var previewGenDoneEvent = new Event( 698 var previewGenDoneEvent = new Event(
699 NativeLayer.EventType.PREVIEW_GENERATION_DONE); 699 NativeLayer.EventType.PREVIEW_GENERATION_DONE);
700 previewGenDoneEvent.previewUid = previewUid; 700 previewGenDoneEvent.previewUid = previewUid;
701 previewGenDoneEvent.previewResponseId = previewResponseId; 701 previewGenDoneEvent.previewResponseId = previewResponseId;
702 this.dispatchEvent(previewGenDoneEvent); 702 this.dispatchEvent(previewGenDoneEvent);
703 }, 703 },
704 704
705 /** 705 /**
706 * Updates print preset options from source PDF document. 706 * Updates print preset options from source PDF document.
707 * Called from PrintPreviewUI::OnSetOptionsFromDocument(). 707 * Called from PrintPreviewUI::OnSetOptionsFromDocument().
708 * @param {{disableScaling: boolean, copies: number}} options Specifies 708 * @param {{disableScaling: boolean, copies: number,
709 * duplex: number}} options Specifies
709 * printing options according to source document presets. 710 * printing options according to source document presets.
710 * @private 711 * @private
711 */ 712 */
712 onPrintPresetOptionsFromDocument_: function(options) { 713 onPrintPresetOptionsFromDocument_: function(options) {
713 var printPresetOptionsEvent = new Event( 714 var printPresetOptionsEvent = new Event(
714 NativeLayer.EventType.PRINT_PRESET_OPTIONS); 715 NativeLayer.EventType.PRINT_PRESET_OPTIONS);
715 printPresetOptionsEvent.optionsFromDocument = options; 716 printPresetOptionsEvent.optionsFromDocument = options;
716 this.dispatchEvent(printPresetOptionsEvent); 717 this.dispatchEvent(printPresetOptionsEvent);
717 }, 718 },
718 719
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 return this.serializedAppStateStr_; 1032 return this.serializedAppStateStr_;
1032 } 1033 }
1033 }; 1034 };
1034 1035
1035 // Export 1036 // Export
1036 return { 1037 return {
1037 NativeInitialSettings: NativeInitialSettings, 1038 NativeInitialSettings: NativeInitialSettings,
1038 NativeLayer: NativeLayer 1039 NativeLayer: NativeLayer
1039 }; 1040 };
1040 }); 1041 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698