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

Side by Side Diff: chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js

Issue 2332483002: [CUPS] Implement the CUPS printer PPD file picker in the manufacturer and model dialog. (Closed)
Patch Set: Fix the failed closure_compilation trybot. Created 4 years, 3 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
OLDNEW
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 * printerAddress: string,
13 * printerDescription: string,
12 * printerId: string, 14 * printerId: string,
13 * printerName: string,
14 * printerDescription: string,
15 * printerManufacturer: string, 15 * printerManufacturer: string,
16 * printerModel: string, 16 * printerModel: string,
17 * printerStatus: string, 17 * printerName: string,
18 * printerAddress: string, 18 * printerPPDPath: string,
19 * printerProtocol: string, 19 * printerProtocol: string,
20 * printerQueue: string 20 * printerQueue: string,
21 * printerStatus: string
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
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.
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698