Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: chrome/browser/resources/print_preview/cloud_print_interface.js

Issue 2881213003: Print Preview: Use cr.sendWithPromise for getInitialSettings (Closed)
Patch Set: Revert extra change from rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/data/destination_store.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/data/destination_store.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698