| 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 this.uiState_ = PrintPreview.UiState_.PRINTING; | 522 this.uiState_ = PrintPreview.UiState_.PRINTING; |
| 523 } | 523 } |
| 524 this.setIsEnabled_(false); | 524 this.setIsEnabled_(false); |
| 525 this.printHeader_.isCancelButtonEnabled = true; | 525 this.printHeader_.isCancelButtonEnabled = true; |
| 526 var printAttemptResult = this.printIfReady_(); | 526 var printAttemptResult = this.printIfReady_(); |
| 527 if (printAttemptResult == PrintPreview.PrintAttemptResult_.PRINTED || | 527 if (printAttemptResult == PrintPreview.PrintAttemptResult_.PRINTED || |
| 528 printAttemptResult == | 528 printAttemptResult == |
| 529 PrintPreview.PrintAttemptResult_.READY_WAITING_FOR_PREVIEW) { | 529 PrintPreview.PrintAttemptResult_.READY_WAITING_FOR_PREVIEW) { |
| 530 if ((this.destinationStore_.selectedDestination.isLocal && | 530 if ((this.destinationStore_.selectedDestination.isLocal && |
| 531 !this.destinationStore_.selectedDestination.isPrivet && | 531 !this.destinationStore_.selectedDestination.isPrivet && |
| 532 !this.destinationStore_.selectedDestination.isExtension && |
| 532 this.destinationStore_.selectedDestination.id != | 533 this.destinationStore_.selectedDestination.id != |
| 533 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF) || | 534 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF) || |
| 534 this.uiState_ == PrintPreview.UiState_.OPENING_PDF_PREVIEW) { | 535 this.uiState_ == PrintPreview.UiState_.OPENING_PDF_PREVIEW) { |
| 535 // Hide the dialog for now. The actual print command will be issued | 536 // Hide the dialog for now. The actual print command will be issued |
| 536 // when the preview generation is done. | 537 // when the preview generation is done. |
| 537 this.nativeLayer_.startHideDialog(); | 538 this.nativeLayer_.startHideDialog(); |
| 538 } | 539 } |
| 539 } | 540 } |
| 540 }, | 541 }, |
| 541 | 542 |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 <include src="search/cloud_destination_list.js"> | 1309 <include src="search/cloud_destination_list.js"> |
| 1309 <include src="search/recent_destination_list.js"> | 1310 <include src="search/recent_destination_list.js"> |
| 1310 <include src="search/destination_list_item.js"> | 1311 <include src="search/destination_list_item.js"> |
| 1311 <include src="search/destination_search.js"> | 1312 <include src="search/destination_search.js"> |
| 1312 <include src="search/fedex_tos.js"> | 1313 <include src="search/fedex_tos.js"> |
| 1313 | 1314 |
| 1314 window.addEventListener('DOMContentLoaded', function() { | 1315 window.addEventListener('DOMContentLoaded', function() { |
| 1315 printPreview = new print_preview.PrintPreview(); | 1316 printPreview = new print_preview.PrintPreview(); |
| 1316 printPreview.initialize(); | 1317 printPreview.initialize(); |
| 1317 }); | 1318 }); |
| OLD | NEW |