| OLD | NEW |
| 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 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 * current destination. | 1177 * current destination. |
| 1178 * @return {boolean} Returns true if link should be shown. | 1178 * @return {boolean} Returns true if link should be shown. |
| 1179 */ | 1179 */ |
| 1180 shouldShowSystemDialogLink_: function() { | 1180 shouldShowSystemDialogLink_: function() { |
| 1181 if (cr.isChromeOS || this.hideSystemDialogLink_) | 1181 if (cr.isChromeOS || this.hideSystemDialogLink_) |
| 1182 return false; | 1182 return false; |
| 1183 if (!cr.isWindows) | 1183 if (!cr.isWindows) |
| 1184 return true; | 1184 return true; |
| 1185 var selectedDest = this.destinationStore_.selectedDestination; | 1185 var selectedDest = this.destinationStore_.selectedDestination; |
| 1186 return !!selectedDest && | 1186 return !!selectedDest && |
| 1187 selectedDest.origin == print_preview.Destination.Origin.LOCAL && | 1187 selectedDest.origin == print_preview.DestinationOrigin.LOCAL && |
| 1188 selectedDest.id != | 1188 selectedDest.id != |
| 1189 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF; | 1189 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF; |
| 1190 }, | 1190 }, |
| 1191 | 1191 |
| 1192 /** | 1192 /** |
| 1193 * Called when a print destination is selected. Shows/hides the "Print with | 1193 * Called when a print destination is selected. Shows/hides the "Print with |
| 1194 * Cloud Print" link in the navbar. | 1194 * Cloud Print" link in the navbar. |
| 1195 * @private | 1195 * @private |
| 1196 */ | 1196 */ |
| 1197 onDestinationSelect_: function() { | 1197 onDestinationSelect_: function() { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 }; | 1264 }; |
| 1265 }); | 1265 }); |
| 1266 | 1266 |
| 1267 // Pull in all other scripts in a single shot. | 1267 // Pull in all other scripts in a single shot. |
| 1268 // <include src="common/overlay.js"> | 1268 // <include src="common/overlay.js"> |
| 1269 // <include src="common/search_box.js"> | 1269 // <include src="common/search_box.js"> |
| 1270 // <include src="common/search_bubble.js"> | 1270 // <include src="common/search_bubble.js"> |
| 1271 | 1271 |
| 1272 // <include src="data/page_number_set.js"> | 1272 // <include src="data/page_number_set.js"> |
| 1273 // <include src="data/destination.js"> | 1273 // <include src="data/destination.js"> |
| 1274 // <include src="data/destination_match.js"> |
| 1274 // <include src="data/local_parsers.js"> | 1275 // <include src="data/local_parsers.js"> |
| 1275 // <include src="data/cloud_parsers.js"> | 1276 // <include src="data/cloud_parsers.js"> |
| 1276 // <include src="data/destination_store.js"> | 1277 // <include src="data/destination_store.js"> |
| 1277 // <include src="data/invitation.js"> | 1278 // <include src="data/invitation.js"> |
| 1278 // <include src="data/invitation_store.js"> | 1279 // <include src="data/invitation_store.js"> |
| 1279 // <include src="data/margins.js"> | 1280 // <include src="data/margins.js"> |
| 1280 // <include src="data/document_info.js"> | 1281 // <include src="data/document_info.js"> |
| 1281 // <include src="data/printable_area.js"> | 1282 // <include src="data/printable_area.js"> |
| 1282 // <include src="data/measurement_system.js"> | 1283 // <include src="data/measurement_system.js"> |
| 1283 // <include src="data/print_ticket_store.js"> | 1284 // <include src="data/print_ticket_store.js"> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1341 // <include src="search/cloud_destination_list.js"> | 1342 // <include src="search/cloud_destination_list.js"> |
| 1342 // <include src="search/recent_destination_list.js"> | 1343 // <include src="search/recent_destination_list.js"> |
| 1343 // <include src="search/destination_list_item.js"> | 1344 // <include src="search/destination_list_item.js"> |
| 1344 // <include src="search/destination_search.js"> | 1345 // <include src="search/destination_search.js"> |
| 1345 // <include src="search/provisional_destination_resolver.js"> | 1346 // <include src="search/provisional_destination_resolver.js"> |
| 1346 | 1347 |
| 1347 window.addEventListener('DOMContentLoaded', function() { | 1348 window.addEventListener('DOMContentLoaded', function() { |
| 1348 printPreview = new print_preview.PrintPreview(); | 1349 printPreview = new print_preview.PrintPreview(); |
| 1349 printPreview.initialize(); | 1350 printPreview.initialize(); |
| 1350 }); | 1351 }); |
| OLD | NEW |