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

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

Issue 2380753004: [CUPS] Implement the Webui handler for the printers auto discovery. (Closed)
Patch Set: Rebase Created 4 years, 2 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 /** 56 /**
57 * @return {!Promise<string>} The full path of the printer PPD file. 57 * @return {!Promise<string>} The full path of the printer PPD file.
58 */ 58 */
59 getCupsPrinterPPDPath: function() {}, 59 getCupsPrinterPPDPath: function() {},
60 60
61 /** 61 /**
62 * @param {!CupsPrinterInfo} newPrinter 62 * @param {!CupsPrinterInfo} newPrinter
63 */ 63 */
64 addCupsPrinter: function(newPrinter) {}, 64 addCupsPrinter: function(newPrinter) {},
65
66 startDiscoveringPrinters: function() {},
67
68 stopDiscoveringPrinters: function() {},
65 }; 69 };
66 70
67 /** 71 /**
68 * @constructor 72 * @constructor
69 * @implements {settings.CupsPrintersBrowserProxy} 73 * @implements {settings.CupsPrintersBrowserProxy}
70 */ 74 */
71 function CupsPrintersBrowserProxyImpl() {} 75 function CupsPrintersBrowserProxyImpl() {}
72 cr.addSingletonGetter(CupsPrintersBrowserProxyImpl); 76 cr.addSingletonGetter(CupsPrintersBrowserProxyImpl);
73 77
74 CupsPrintersBrowserProxyImpl.prototype = { 78 CupsPrintersBrowserProxyImpl.prototype = {
(...skipping 14 matching lines...) Expand all
89 93
90 /** @override */ 94 /** @override */
91 addCupsPrinter: function(newPrinter) { 95 addCupsPrinter: function(newPrinter) {
92 chrome.send('addCupsPrinter', [newPrinter]); 96 chrome.send('addCupsPrinter', [newPrinter]);
93 }, 97 },
94 98
95 /** @override */ 99 /** @override */
96 getCupsPrinterPPDPath: function() { 100 getCupsPrinterPPDPath: function() {
97 return cr.sendWithPromise('selectPPDFile'); 101 return cr.sendWithPromise('selectPPDFile');
98 }, 102 },
103
104 /** @override */
105 startDiscoveringPrinters: function() {
106 chrome.send('startDiscoveringPrinters');
107 },
108
109 /** @override */
110 stopDiscoveringPrinters: function() {
111 chrome.send('stopDiscoveringPrinters');
112 },
99 }; 113 };
100 114
101 return { 115 return {
102 CupsPrintersBrowserProxy: CupsPrintersBrowserProxy, 116 CupsPrintersBrowserProxy: CupsPrintersBrowserProxy,
103 CupsPrintersBrowserProxyImpl: CupsPrintersBrowserProxyImpl, 117 CupsPrintersBrowserProxyImpl: CupsPrintersBrowserProxyImpl,
104 }; 118 };
105 }); 119 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698