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

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

Issue 2333283004: [CUPS] Implement the UI handler for adding a new printer. (Closed)
Patch Set: Rebase. Nits fix. 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 /**
(...skipping 29 matching lines...) Expand all
40 */ 40 */
41 getCupsPrintersList: function() {}, 41 getCupsPrintersList: function() {},
42 42
43 /** 43 /**
44 * @param {string} printerId 44 * @param {string} printerId
45 * @param {string} printerName 45 * @param {string} printerName
46 */ 46 */
47 updateCupsPrinter: function(printerId, printerName) {}, 47 updateCupsPrinter: function(printerId, printerName) {},
48 48
49 /** 49 /**
50 * @param {string} printerId 50 * @param {string} printerId
michaelpg 2016/09/20 20:58:42 add param
xdai1 2016/09/21 17:40:19 Done.
51 */ 51 */
52 removeCupsPrinter: function(printerId) {}, 52 removeCupsPrinter: function(printerId, printerName) {},
53 53
54 /**
55 * @param {!CupsPrinterInfo} newPrinter
56 */
57 addCupsPrinter: function(newPrinter) {},
54 }; 58 };
55 59
56 /** 60 /**
57 * @constructor 61 * @constructor
58 * @implements {settings.CupsPrintersBrowserProxy} 62 * @implements {settings.CupsPrintersBrowserProxy}
59 */ 63 */
60 function CupsPrintersBrowserProxyImpl() {} 64 function CupsPrintersBrowserProxyImpl() {}
61 cr.addSingletonGetter(CupsPrintersBrowserProxyImpl); 65 cr.addSingletonGetter(CupsPrintersBrowserProxyImpl);
62 66
63 CupsPrintersBrowserProxyImpl.prototype = { 67 CupsPrintersBrowserProxyImpl.prototype = {
64 /** override */ 68 /** @override */
65 getCupsPrintersList: function() { 69 getCupsPrintersList: function() {
66 return cr.sendWithPromise('getCupsPrintersList'); 70 return cr.sendWithPromise('getCupsPrintersList');
67 }, 71 },
68 72
69 /** override */ 73 /** @override */
70 updateCupsPrinter: function(printerId, printerName) { 74 updateCupsPrinter: function(printerId, printerName) {
71 chrome.send('updateCupsPrinter', [printerId, printerName]); 75 chrome.send('updateCupsPrinter', [printerId, printerName]);
72 }, 76 },
73 77
74 /** override */ 78 /** @override */
75 removeCupsPrinter: function(printerId) { 79 removeCupsPrinter: function(printerId, printerName) {
76 chrome.send('removeCupsPrinter', [printerId]); 80 chrome.send('removeCupsPrinter', [printerId, printerName]);
81 },
82
83 /** @override */
84 addCupsPrinter: function(newPrinter) {
85 chrome.send('addCupsPrinter', [newPrinter]);
77 }, 86 },
78 }; 87 };
79 88
80 return { 89 return {
81 CupsPrintersBrowserProxy: CupsPrintersBrowserProxy, 90 CupsPrintersBrowserProxy: CupsPrintersBrowserProxy,
82 CupsPrintersBrowserProxyImpl: CupsPrintersBrowserProxyImpl, 91 CupsPrintersBrowserProxyImpl: CupsPrintersBrowserProxyImpl,
83 }; 92 };
84 }); 93 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698