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

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

Issue 399973004: Advanced printing destination settings modal dialog (non-functional yet, just the skeleton). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 unified diff | Download patch | Annotate | Revision Log
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 var localStrings = new LocalStrings(templateData); 7 var localStrings = new LocalStrings(templateData);
8 8
9 <include src="component.js"/> 9 <include src="component.js"/>
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 */ 158 */
159 this.otherOptionsSettings_ = new print_preview.OtherOptionsSettings( 159 this.otherOptionsSettings_ = new print_preview.OtherOptionsSettings(
160 this.printTicketStore_.duplex, 160 this.printTicketStore_.duplex,
161 this.printTicketStore_.fitToPage, 161 this.printTicketStore_.fitToPage,
162 this.printTicketStore_.cssBackground, 162 this.printTicketStore_.cssBackground,
163 this.printTicketStore_.selectionOnly, 163 this.printTicketStore_.selectionOnly,
164 this.printTicketStore_.headerFooter); 164 this.printTicketStore_.headerFooter);
165 this.addChild(this.otherOptionsSettings_); 165 this.addChild(this.otherOptionsSettings_);
166 166
167 /** 167 /**
168 * Component used to search for print destinations.
169 * @type {!print_preview.AdvancedSettings}
170 * @private
171 */
172 this.advancedSettings_ = new print_preview.AdvancedSettings(this.metrics_);
173 this.addChild(this.advancedSettings_);
174
175 /**
168 * Area of the UI that holds the print preview. 176 * Area of the UI that holds the print preview.
169 * @type {!print_preview.PreviewArea} 177 * @type {!print_preview.PreviewArea}
170 * @private 178 * @private
171 */ 179 */
172 this.previewArea_ = new print_preview.PreviewArea(this.destinationStore_, 180 this.previewArea_ = new print_preview.PreviewArea(this.destinationStore_,
173 this.printTicketStore_, 181 this.printTicketStore_,
174 this.nativeLayer_, 182 this.nativeLayer_,
175 this.documentInfo_); 183 this.documentInfo_);
176 this.addChild(this.previewArea_); 184 this.addChild(this.previewArea_);
177 185
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 this.printHeader_.decorate($('print-header')); 408 this.printHeader_.decorate($('print-header'));
401 this.destinationSearch_.decorate($('destination-search')); 409 this.destinationSearch_.decorate($('destination-search'));
402 this.destinationSettings_.decorate($('destination-settings')); 410 this.destinationSettings_.decorate($('destination-settings'));
403 this.pageSettings_.decorate($('page-settings')); 411 this.pageSettings_.decorate($('page-settings'));
404 this.copiesSettings_.decorate($('copies-settings')); 412 this.copiesSettings_.decorate($('copies-settings'));
405 this.mediaSizeSettings_.decorate($('media-size-settings')); 413 this.mediaSizeSettings_.decorate($('media-size-settings'));
406 this.layoutSettings_.decorate($('layout-settings')); 414 this.layoutSettings_.decorate($('layout-settings'));
407 this.colorSettings_.decorate($('color-settings')); 415 this.colorSettings_.decorate($('color-settings'));
408 this.marginSettings_.decorate($('margin-settings')); 416 this.marginSettings_.decorate($('margin-settings'));
409 this.otherOptionsSettings_.decorate($('other-options-settings')); 417 this.otherOptionsSettings_.decorate($('other-options-settings'));
418 this.advancedSettings_.decorate($('advanced-settings'));
410 this.previewArea_.decorate($('preview-area')); 419 this.previewArea_.decorate($('preview-area'));
411 420
412 setIsVisible($('open-pdf-in-preview-link'), cr.isMac); 421 setIsVisible($('open-pdf-in-preview-link'), cr.isMac);
413 }, 422 },
414 423
415 /** 424 /**
416 * Sets whether the controls in the print preview are enabled. 425 * Sets whether the controls in the print preview are enabled.
417 * @param {boolean} isEnabled Whether the controls in the print preview are 426 * @param {boolean} isEnabled Whether the controls in the print preview are
418 * enabled. 427 * enabled.
419 * @private 428 * @private
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 } 1129 }
1121 }; 1130 };
1122 1131
1123 // Export 1132 // Export
1124 return { 1133 return {
1125 PrintPreview: PrintPreview 1134 PrintPreview: PrintPreview
1126 }; 1135 };
1127 }); 1136 });
1128 1137
1129 // Pull in all other scripts in a single shot. 1138 // Pull in all other scripts in a single shot.
1139 <include src="common/search_box.js"/>
1140
1130 <include src="data/page_number_set.js"/> 1141 <include src="data/page_number_set.js"/>
1131 <include src="data/destination.js"/> 1142 <include src="data/destination.js"/>
1132 <include src="data/local_parsers.js"/> 1143 <include src="data/local_parsers.js"/>
1133 <include src="data/cloud_parsers.js"/> 1144 <include src="data/cloud_parsers.js"/>
1134 <include src="data/destination_store.js"/> 1145 <include src="data/destination_store.js"/>
1135 <include src="data/margins.js"/> 1146 <include src="data/margins.js"/>
1136 <include src="data/document_info.js"/> 1147 <include src="data/document_info.js"/>
1137 <include src="data/printable_area.js"/> 1148 <include src="data/printable_area.js"/>
1138 <include src="data/measurement_system.js"/> 1149 <include src="data/measurement_system.js"/>
1139 <include src="data/print_ticket_store.js"/> 1150 <include src="data/print_ticket_store.js"/>
(...skipping 27 matching lines...) Expand all
1167 <include src="metrics.js"/> 1178 <include src="metrics.js"/>
1168 1179
1169 <include src="settings/page_settings.js"/> 1180 <include src="settings/page_settings.js"/>
1170 <include src="settings/copies_settings.js"/> 1181 <include src="settings/copies_settings.js"/>
1171 <include src="settings/media_size_settings.js"/> 1182 <include src="settings/media_size_settings.js"/>
1172 <include src="settings/layout_settings.js"/> 1183 <include src="settings/layout_settings.js"/>
1173 <include src="settings/color_settings.js"/> 1184 <include src="settings/color_settings.js"/>
1174 <include src="settings/margin_settings.js"/> 1185 <include src="settings/margin_settings.js"/>
1175 <include src="settings/destination_settings.js"/> 1186 <include src="settings/destination_settings.js"/>
1176 <include src="settings/other_options_settings.js"/> 1187 <include src="settings/other_options_settings.js"/>
1188 <include src="settings/advanced_settings/advanced_settings.js"/>
1177 1189
1178 <include src="previewarea/margin_control.js"/> 1190 <include src="previewarea/margin_control.js"/>
1179 <include src="previewarea/margin_control_container.js"/> 1191 <include src="previewarea/margin_control_container.js"/>
1180 <include src="../pdf/pdf_scripting_api.js" /> 1192 <include src="../pdf/pdf_scripting_api.js" />
1181 <include src="previewarea/preview_area.js"/> 1193 <include src="previewarea/preview_area.js"/>
1182 <include src="preview_generator.js"/> 1194 <include src="preview_generator.js"/>
1183 1195
1184 <include src="search/destination_list.js"/> 1196 <include src="search/destination_list.js"/>
1185 <include src="search/cloud_destination_list.js"/> 1197 <include src="search/cloud_destination_list.js"/>
1186 <include src="search/recent_destination_list.js"/> 1198 <include src="search/recent_destination_list.js"/>
1187 <include src="search/destination_list_item.js"/> 1199 <include src="search/destination_list_item.js"/>
1188 <include src="search/destination_search.js"/> 1200 <include src="search/destination_search.js"/>
1189 <include src="search/search_box.js"/>
1190 <include src="search/fedex_tos.js"/> 1201 <include src="search/fedex_tos.js"/>
1191 1202
1192 window.addEventListener('DOMContentLoaded', function() { 1203 window.addEventListener('DOMContentLoaded', function() {
1193 printPreview = new print_preview.PrintPreview(); 1204 printPreview = new print_preview.PrintPreview();
1194 printPreview.initialize(); 1205 printPreview.initialize();
1195 }); 1206 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698