| 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 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 | 489 |
| 490 /** | 490 /** |
| 491 * Calls when the native layer enables Google Cloud Print integration. | 491 * Calls when the native layer enables Google Cloud Print integration. |
| 492 * Fetches the user's cloud printers. | 492 * Fetches the user's cloud printers. |
| 493 * @param {cr.Event} event Contains the base URL of the Google Cloud Print | 493 * @param {cr.Event} event Contains the base URL of the Google Cloud Print |
| 494 * service. | 494 * service. |
| 495 * @private | 495 * @private |
| 496 */ | 496 */ |
| 497 onCloudPrintEnable_: function(event) { | 497 onCloudPrintEnable_: function(event) { |
| 498 this.cloudPrintInterface_ = | 498 this.cloudPrintInterface_ = |
| 499 new cloudprint.CloudPrintInterface(event.baseCloudPrintUrl); | 499 new cloudprint.CloudPrintInterface(event.baseCloudPrintUrl, |
| 500 this.nativeLayer_); |
| 500 this.tracker.add( | 501 this.tracker.add( |
| 501 this.cloudPrintInterface_, | 502 this.cloudPrintInterface_, |
| 502 cloudprint.CloudPrintInterface.EventType.SUBMIT_DONE, | 503 cloudprint.CloudPrintInterface.EventType.SUBMIT_DONE, |
| 503 this.onCloudPrintSubmitDone_.bind(this)); | 504 this.onCloudPrintSubmitDone_.bind(this)); |
| 504 this.tracker.add( | 505 this.tracker.add( |
| 505 this.cloudPrintInterface_, | 506 this.cloudPrintInterface_, |
| 506 cloudprint.CloudPrintInterface.EventType.SEARCH_FAILED, | 507 cloudprint.CloudPrintInterface.EventType.SEARCH_FAILED, |
| 507 this.onCloudPrintError_.bind(this)); | 508 this.onCloudPrintError_.bind(this)); |
| 508 this.tracker.add( | 509 this.tracker.add( |
| 509 this.cloudPrintInterface_, | 510 this.cloudPrintInterface_, |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 <include src="search/recent_destination_list.js"/> | 926 <include src="search/recent_destination_list.js"/> |
| 926 <include src="search/destination_list_item.js"/> | 927 <include src="search/destination_list_item.js"/> |
| 927 <include src="search/destination_search.js"/> | 928 <include src="search/destination_search.js"/> |
| 928 <include src="search/search_box.js"/> | 929 <include src="search/search_box.js"/> |
| 929 <include src="search/fedex_tos.js"/> | 930 <include src="search/fedex_tos.js"/> |
| 930 | 931 |
| 931 window.addEventListener('DOMContentLoaded', function() { | 932 window.addEventListener('DOMContentLoaded', function() { |
| 932 printPreview = new print_preview.PrintPreview(); | 933 printPreview = new print_preview.PrintPreview(); |
| 933 printPreview.initialize(); | 934 printPreview.initialize(); |
| 934 }); | 935 }); |
| OLD | NEW |