Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 /** | 5 /** |
| 6 * @fileoverview A helper object used from the "CUPS printing" section to | 6 * @fileoverview A helper object used from the "CUPS printing" section to |
| 7 * interact with the browser. | 7 * interact with the browser. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 /** | 10 /** |
| 11 * @typedef {{ | 11 * @typedef {{ |
| 12 * printerId: string, | 12 * printerId: string, |
| 13 * printerName: string, | 13 * printerName: string, |
| 14 * printerDescription: string, | 14 * printerDescription: string, |
| 15 * printerManufacturer: string, | 15 * printerManufacturer: string, |
| 16 * printerModel: string, | 16 * printerModel: string, |
| 17 * printerStatus: string, | 17 * printerStatus: string, |
| 18 * printerAddress: string, | 18 * printerAddress: string, |
| 19 * printerProtocol: string, | 19 * printerProtocol: string, |
| 20 * printerQueue: string | 20 * printerQueue: string, |
| 21 * printerPPDPath: string | |
|
michaelpg
2016/09/15 03:01:39
alpha?
xdai1
2016/09/16 21:19:32
Done.
| |
| 21 * }} | 22 * }} |
| 22 */ | 23 */ |
| 23 var CupsPrinterInfo; | 24 var CupsPrinterInfo; |
| 24 | 25 |
| 25 /** | 26 /** |
| 26 * @typedef {{ | 27 * @typedef {{ |
| 27 * printerList: !Array<!CupsPrinterInfo>, | 28 * printerList: !Array<!CupsPrinterInfo>, |
| 28 * }} | 29 * }} |
| 29 */ | 30 */ |
| 30 var CupsPrintersList; | 31 var CupsPrintersList; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 44 * @param {string} printerId | 45 * @param {string} printerId |
| 45 * @param {string} printerName | 46 * @param {string} printerName |
| 46 */ | 47 */ |
| 47 updateCupsPrinter: function(printerId, printerName) {}, | 48 updateCupsPrinter: function(printerId, printerName) {}, |
| 48 | 49 |
| 49 /** | 50 /** |
| 50 * @param {string} printerId | 51 * @param {string} printerId |
| 51 */ | 52 */ |
| 52 removeCupsPrinter: function(printerId) {}, | 53 removeCupsPrinter: function(printerId) {}, |
| 53 | 54 |
| 55 /** | |
| 56 * @return {!Promise<string>} the full path of the printer PPD file. | |
|
michaelpg
2016/09/15 03:01:39
capitalize description
xdai1
2016/09/16 21:19:32
Done.
| |
| 57 */ | |
| 58 getCupsPrinterPPDPath: function() {}, | |
| 54 }; | 59 }; |
| 55 | 60 |
| 56 /** | 61 /** |
| 57 * @constructor | 62 * @constructor |
| 58 * @implements {settings.CupsPrintersBrowserProxy} | 63 * @implements {settings.CupsPrintersBrowserProxy} |
| 59 */ | 64 */ |
| 60 function CupsPrintersBrowserProxyImpl() {} | 65 function CupsPrintersBrowserProxyImpl() {} |
| 61 cr.addSingletonGetter(CupsPrintersBrowserProxyImpl); | 66 cr.addSingletonGetter(CupsPrintersBrowserProxyImpl); |
| 62 | 67 |
| 63 CupsPrintersBrowserProxyImpl.prototype = { | 68 CupsPrintersBrowserProxyImpl.prototype = { |
| 64 /** override */ | 69 /** @override */ |
| 65 getCupsPrintersList: function() { | 70 getCupsPrintersList: function() { |
| 66 return cr.sendWithPromise('getCupsPrintersList'); | 71 return cr.sendWithPromise('getCupsPrintersList'); |
| 67 }, | 72 }, |
| 68 | 73 |
| 69 /** override */ | 74 /** @override */ |
| 70 updateCupsPrinter: function(printerId, printerName) { | 75 updateCupsPrinter: function(printerId, printerName) { |
| 71 chrome.send('updateCupsPrinter', [printerId, printerName]); | 76 chrome.send('updateCupsPrinter', [printerId, printerName]); |
| 72 }, | 77 }, |
| 73 | 78 |
| 74 /** override */ | 79 /** @override */ |
| 75 removeCupsPrinter: function(printerId) { | 80 removeCupsPrinter: function(printerId) { |
| 76 chrome.send('removeCupsPrinter', [printerId]); | 81 chrome.send('removeCupsPrinter', [printerId]); |
| 77 }, | 82 }, |
| 83 | |
| 84 /** @override */ | |
| 85 getCupsPrinterPPDPath: function() { | |
| 86 return cr.sendWithPromise('selectPPDFile'); | |
| 87 }, | |
| 78 }; | 88 }; |
| 79 | 89 |
| 80 return { | 90 return { |
| 81 CupsPrintersBrowserProxy: CupsPrintersBrowserProxy, | 91 CupsPrintersBrowserProxy: CupsPrintersBrowserProxy, |
| 82 CupsPrintersBrowserProxyImpl: CupsPrintersBrowserProxyImpl, | 92 CupsPrintersBrowserProxyImpl: CupsPrintersBrowserProxyImpl, |
| 83 }; | 93 }; |
| 84 }); | 94 }); |
| OLD | NEW |