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.define('cloudprint', function() { | 5 cr.define('cloudprint', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * API to the Google Cloud Print service. | 9 * API to the Google Cloud Print service. |
10 * @param {string} baseUrl Base part of the Google Cloud Print service URL | 10 * @param {string} baseUrl Base part of the Google Cloud Print service URL |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 }, | 207 }, |
208 | 208 |
209 /** | 209 /** |
210 * Sends a Google Cloud Print printer API request. | 210 * Sends a Google Cloud Print printer API request. |
211 * @param {string} printerId ID of the printer to lookup. | 211 * @param {string} printerId ID of the printer to lookup. |
212 * @param {!print_preview.Destination.Origin} origin Origin of the printer. | 212 * @param {!print_preview.Destination.Origin} origin Origin of the printer. |
213 */ | 213 */ |
214 printer: function(printerId, origin) { | 214 printer: function(printerId, origin) { |
215 var params = [ | 215 var params = [ |
216 new HttpParam('printerid', printerId), | 216 new HttpParam('printerid', printerId), |
217 new HttpParam('use_cdd', 'true') | 217 new HttpParam('use_cdd', 'true'), |
| 218 new HttpParam('printer_connection_status', 'true') |
218 ]; | 219 ]; |
219 var cpRequest = | 220 var cpRequest = |
220 this.buildRequest_('GET', 'printer', params, origin, | 221 this.buildRequest_('GET', 'printer', params, origin, |
221 this.onPrinterDone_.bind(this, printerId)); | 222 this.onPrinterDone_.bind(this, printerId)); |
222 this.sendOrQueueRequest_(cpRequest); | 223 this.sendOrQueueRequest_(cpRequest); |
223 }, | 224 }, |
224 | 225 |
225 /** | 226 /** |
226 * Sends a Google Cloud Print update API request to accept (or reject) the | 227 * Sends a Google Cloud Print update API request to accept (or reject) the |
227 * terms-of-service of the given printer. | 228 * terms-of-service of the given printer. |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 * @type {string} | 563 * @type {string} |
563 */ | 564 */ |
564 this.value = value; | 565 this.value = value; |
565 }; | 566 }; |
566 | 567 |
567 // Export | 568 // Export |
568 return { | 569 return { |
569 CloudPrintInterface: CloudPrintInterface | 570 CloudPrintInterface: CloudPrintInterface |
570 }; | 571 }; |
571 }); | 572 }); |
OLD | NEW |