| 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 cr.exportPath('cloudprint'); | 5 cr.exportPath('cloudprint'); |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Event types dispatched by the cloudprint interface. | 8 * Event types dispatched by the cloudprint interface. |
| 9 * @enum {string} | 9 * @enum {string} |
| 10 */ | 10 */ |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 account || '', | 339 account || '', |
| 340 this.onPrinterDone_.bind(this, printerId))); | 340 this.onPrinterDone_.bind(this, printerId))); |
| 341 }, | 341 }, |
| 342 | 342 |
| 343 /** | 343 /** |
| 344 * Adds event listeners to relevant events. | 344 * Adds event listeners to relevant events. |
| 345 * @private | 345 * @private |
| 346 */ | 346 */ |
| 347 addEventListeners_: function() { | 347 addEventListeners_: function() { |
| 348 this.tracker_.add( | 348 this.tracker_.add( |
| 349 this.nativeLayer_, | 349 this.nativeLayer_.getEventTarget(), |
| 350 print_preview.NativeLayer.EventType.ACCESS_TOKEN_READY, | 350 print_preview.NativeLayer.EventType.ACCESS_TOKEN_READY, |
| 351 this.onAccessTokenReady_.bind(this)); | 351 this.onAccessTokenReady_.bind(this)); |
| 352 }, | 352 }, |
| 353 | 353 |
| 354 /** | 354 /** |
| 355 * Builds request to the Google Cloud Print API. | 355 * Builds request to the Google Cloud Print API. |
| 356 * @param {string} method HTTP method of the request. | 356 * @param {string} method HTTP method of the request. |
| 357 * @param {string} action Google Cloud Print action to perform. | 357 * @param {string} action Google Cloud Print action to perform. |
| 358 * @param {Array<!HttpParam>} params HTTP parameters to include in the | 358 * @param {Array<!HttpParam>} params HTTP parameters to include in the |
| 359 * request. | 359 * request. |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 */ | 821 */ |
| 822 this.value = value; | 822 this.value = value; |
| 823 } | 823 } |
| 824 | 824 |
| 825 // Export | 825 // Export |
| 826 return { | 826 return { |
| 827 CloudPrintInterface: CloudPrintInterface, | 827 CloudPrintInterface: CloudPrintInterface, |
| 828 CloudPrintRequest: CloudPrintRequest | 828 CloudPrintRequest: CloudPrintRequest |
| 829 }; | 829 }; |
| 830 }); | 830 }); |
| OLD | NEW |