| 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 } | 548 } |
| 549 if (this.isPreviewGenerationInProgress_) { | 549 if (this.isPreviewGenerationInProgress_) { |
| 550 return PrintPreview.PrintAttemptResult_.READY_WAITING_FOR_PREVIEW; | 550 return PrintPreview.PrintAttemptResult_.READY_WAITING_FOR_PREVIEW; |
| 551 } | 551 } |
| 552 assert(this.printTicketStore_.isTicketValid(), | 552 assert(this.printTicketStore_.isTicketValid(), |
| 553 'Trying to print with invalid ticket'); | 553 'Trying to print with invalid ticket'); |
| 554 if (this.uiState_ == PrintPreview.UiState_.OPENING_CLOUD_PRINT_DIALOG) { | 554 if (this.uiState_ == PrintPreview.UiState_.OPENING_CLOUD_PRINT_DIALOG) { |
| 555 this.nativeLayer_.startShowCloudPrintDialog( | 555 this.nativeLayer_.startShowCloudPrintDialog( |
| 556 this.printTicketStore_.pageRange.getPageNumberSet().size); | 556 this.printTicketStore_.pageRange.getPageNumberSet().size); |
| 557 } else { | 557 } else { |
| 558 if (getIsVisible(this.moreSettings_.getElement())) { |
| 559 new print_preview.PrintSettingsUiMetricsContext().record( |
| 560 this.moreSettings_.isExpanded ? |
| 561 print_preview.Metrics.PrintSettingsUiBucket. |
| 562 PRINT_WITH_SETTINGS_EXPANDED : |
| 563 print_preview.Metrics.PrintSettingsUiBucket. |
| 564 PRINT_WITH_SETTINGS_COLLAPSED); |
| 565 } |
| 558 this.nativeLayer_.startPrint( | 566 this.nativeLayer_.startPrint( |
| 559 this.destinationStore_.selectedDestination, | 567 this.destinationStore_.selectedDestination, |
| 560 this.printTicketStore_, | 568 this.printTicketStore_, |
| 561 this.cloudPrintInterface_, | 569 this.cloudPrintInterface_, |
| 562 this.documentInfo_, | 570 this.documentInfo_, |
| 563 this.uiState_ == PrintPreview.UiState_.OPENING_PDF_PREVIEW, | 571 this.uiState_ == PrintPreview.UiState_.OPENING_PDF_PREVIEW, |
| 564 this.showSystemDialogBeforeNextPrint_); | 572 this.showSystemDialogBeforeNextPrint_); |
| 565 this.showSystemDialogBeforeNextPrint_ = false; | 573 this.showSystemDialogBeforeNextPrint_ = false; |
| 566 } | 574 } |
| 567 return PrintPreview.PrintAttemptResult_.PRINTED; | 575 return PrintPreview.PrintAttemptResult_.PRINTED; |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 <include src="search/cloud_destination_list.js"> | 1301 <include src="search/cloud_destination_list.js"> |
| 1294 <include src="search/recent_destination_list.js"> | 1302 <include src="search/recent_destination_list.js"> |
| 1295 <include src="search/destination_list_item.js"> | 1303 <include src="search/destination_list_item.js"> |
| 1296 <include src="search/destination_search.js"> | 1304 <include src="search/destination_search.js"> |
| 1297 <include src="search/fedex_tos.js"> | 1305 <include src="search/fedex_tos.js"> |
| 1298 | 1306 |
| 1299 window.addEventListener('DOMContentLoaded', function() { | 1307 window.addEventListener('DOMContentLoaded', function() { |
| 1300 printPreview = new print_preview.PrintPreview(); | 1308 printPreview = new print_preview.PrintPreview(); |
| 1301 printPreview.initialize(); | 1309 printPreview.initialize(); |
| 1302 }); | 1310 }); |
| OLD | NEW |