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

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

Issue 1125343004: Add a "Simplify Page" option to the print preview dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and remove custom URL source Created 5 years, 6 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 // TODO(rltoscano): Move data/* into print_preview.data namespace 5 // TODO(rltoscano): Move data/* into print_preview.data namespace
6 6
7 <include src="component.js"> 7 <include src="component.js">
8 <include src="print_preview_focus_manager.js"> 8 <include src="print_preview_focus_manager.js">
9 9
10 cr.define('print_preview', function() { 10 cr.define('print_preview', function() {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 /** 162 /**
163 * Component that renders miscellaneous print options. 163 * Component that renders miscellaneous print options.
164 * @type {!print_preview.OtherOptionsSettings} 164 * @type {!print_preview.OtherOptionsSettings}
165 * @private 165 * @private
166 */ 166 */
167 this.otherOptionsSettings_ = new print_preview.OtherOptionsSettings( 167 this.otherOptionsSettings_ = new print_preview.OtherOptionsSettings(
168 this.printTicketStore_.duplex, 168 this.printTicketStore_.duplex,
169 this.printTicketStore_.fitToPage, 169 this.printTicketStore_.fitToPage,
170 this.printTicketStore_.cssBackground, 170 this.printTicketStore_.cssBackground,
171 this.printTicketStore_.selectionOnly, 171 this.printTicketStore_.selectionOnly,
172 this.printTicketStore_.headerFooter); 172 this.printTicketStore_.headerFooter,
173 this.printTicketStore_.printFriendly);
173 this.addChild(this.otherOptionsSettings_); 174 this.addChild(this.otherOptionsSettings_);
174 175
175 /** 176 /**
176 * Component that renders the advanced options button. 177 * Component that renders the advanced options button.
177 * @type {!print_preview.AdvancedOptionsSettings} 178 * @type {!print_preview.AdvancedOptionsSettings}
178 * @private 179 * @private
179 */ 180 */
180 this.advancedOptionsSettings_ = new print_preview.AdvancedOptionsSettings( 181 this.advancedOptionsSettings_ = new print_preview.AdvancedOptionsSettings(
181 this.printTicketStore_.vendorItems, this.destinationStore_); 182 this.printTicketStore_.vendorItems, this.destinationStore_);
182 this.addChild(this.advancedOptionsSettings_); 183 this.addChild(this.advancedOptionsSettings_);
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 settings.serializedAppStateStr, 634 settings.serializedAppStateStr,
634 settings.systemDefaultDestinationId); 635 settings.systemDefaultDestinationId);
635 this.documentInfo_.init( 636 this.documentInfo_.init(
636 settings.isDocumentModifiable, 637 settings.isDocumentModifiable,
637 settings.documentTitle, 638 settings.documentTitle,
638 settings.documentHasSelection); 639 settings.documentHasSelection);
639 this.printTicketStore_.init( 640 this.printTicketStore_.init(
640 settings.thousandsDelimeter, 641 settings.thousandsDelimeter,
641 settings.decimalDelimeter, 642 settings.decimalDelimeter,
642 settings.unitType, 643 settings.unitType,
643 settings.selectionOnly); 644 settings.selectionOnly,
645 settings.printFriendlyEnabled);
646
644 this.destinationStore_.init(settings.isInAppKioskMode); 647 this.destinationStore_.init(settings.isInAppKioskMode);
645 this.appState_.setInitialized(); 648 this.appState_.setInitialized();
646 649
647 $('document-title').innerText = settings.documentTitle; 650 $('document-title').innerText = settings.documentTitle;
648 this.hideSystemDialogLink_ = settings.hidePrintWithSystemDialogLink || 651 this.hideSystemDialogLink_ = settings.hidePrintWithSystemDialogLink ||
649 settings.isInAppKioskMode; 652 settings.isInAppKioskMode;
650 if ($('system-dialog-link')) { 653 if ($('system-dialog-link')) {
651 setIsVisible($('system-dialog-link'), 654 setIsVisible($('system-dialog-link'),
652 this.shouldShowSystemDialogLink_()); 655 this.shouldShowSystemDialogLink_());
653 } 656 }
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 1266
1264 <include src="data/ticket_items/ticket_item.js"> 1267 <include src="data/ticket_items/ticket_item.js">
1265 1268
1266 <include src="data/ticket_items/custom_margins.js"> 1269 <include src="data/ticket_items/custom_margins.js">
1267 <include src="data/ticket_items/collate.js"> 1270 <include src="data/ticket_items/collate.js">
1268 <include src="data/ticket_items/color.js"> 1271 <include src="data/ticket_items/color.js">
1269 <include src="data/ticket_items/copies.js"> 1272 <include src="data/ticket_items/copies.js">
1270 <include src="data/ticket_items/dpi.js"> 1273 <include src="data/ticket_items/dpi.js">
1271 <include src="data/ticket_items/duplex.js"> 1274 <include src="data/ticket_items/duplex.js">
1272 <include src="data/ticket_items/header_footer.js"> 1275 <include src="data/ticket_items/header_footer.js">
1276 <include src="data/ticket_items/print_friendly.js">
1273 <include src="data/ticket_items/media_size.js"> 1277 <include src="data/ticket_items/media_size.js">
1274 <include src="data/ticket_items/landscape.js"> 1278 <include src="data/ticket_items/landscape.js">
1275 <include src="data/ticket_items/margins_type.js"> 1279 <include src="data/ticket_items/margins_type.js">
1276 <include src="data/ticket_items/page_range.js"> 1280 <include src="data/ticket_items/page_range.js">
1277 <include src="data/ticket_items/fit_to_page.js"> 1281 <include src="data/ticket_items/fit_to_page.js">
1278 <include src="data/ticket_items/css_background.js"> 1282 <include src="data/ticket_items/css_background.js">
1279 <include src="data/ticket_items/selection_only.js"> 1283 <include src="data/ticket_items/selection_only.js">
1280 <include src="data/ticket_items/vendor_items.js"> 1284 <include src="data/ticket_items/vendor_items.js">
1281 1285
1282 <include src="native_layer.js"> 1286 <include src="native_layer.js">
(...skipping 30 matching lines...) Expand all
1313 <include src="search/recent_destination_list.js"> 1317 <include src="search/recent_destination_list.js">
1314 <include src="search/destination_list_item.js"> 1318 <include src="search/destination_list_item.js">
1315 <include src="search/destination_search.js"> 1319 <include src="search/destination_search.js">
1316 <include src="search/fedex_tos.js"> 1320 <include src="search/fedex_tos.js">
1317 <include src="search/provisional_destination_resolver.js"> 1321 <include src="search/provisional_destination_resolver.js">
1318 1322
1319 window.addEventListener('DOMContentLoaded', function() { 1323 window.addEventListener('DOMContentLoaded', function() {
1320 printPreview = new print_preview.PrintPreview(); 1324 printPreview = new print_preview.PrintPreview();
1321 printPreview.initialize(); 1325 printPreview.initialize();
1322 }); 1326 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698