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

Unified Diff: chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js

Issue 2954863003: MD Settings: Convert all browser proxies to use ES6 class syntax. (Closed)
Patch Set: Remove @constructor annotations. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js
diff --git a/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js b/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js
index 3af40d9758b3454d44e6e3751cbbe64007f4c0be..2a5eb458004af07ad0e6240a560bf8d8aedd7233 100644
--- a/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js
+++ b/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js
@@ -65,117 +65,111 @@ var QueryFailure;
cr.define('settings', function() {
/** @interface */
- function CupsPrintersBrowserProxy() {}
-
- CupsPrintersBrowserProxy.prototype = {
-
+ class CupsPrintersBrowserProxy {
/**
* @return {!Promise<!CupsPrintersList>}
*/
- getCupsPrintersList: function() {},
+ getCupsPrintersList() {}
/**
* @param {string} printerId
* @param {string} printerName
*/
- updateCupsPrinter: function(printerId, printerName) {},
+ updateCupsPrinter(printerId, printerName) {}
/**
* @param {string} printerId
* @param {string} printerName
*/
- removeCupsPrinter: function(printerId, printerName) {},
+ removeCupsPrinter(printerId, printerName) {}
/**
* @return {!Promise<string>} The full path of the printer PPD file.
*/
- getCupsPrinterPPDPath: function() {},
+ getCupsPrinterPPDPath() {}
/**
* @param {!CupsPrinterInfo} newPrinter
*/
- addCupsPrinter: function(newPrinter) {},
-
- startDiscoveringPrinters: function() {},
+ addCupsPrinter(newPrinter) {}
- stopDiscoveringPrinters: function() {},
+ startDiscoveringPrinters() {}
+ stopDiscoveringPrinters() {}
/**
* @return {!Promise<!ManufacturersInfo>}
*/
- getCupsPrinterManufacturersList: function() {},
+ getCupsPrinterManufacturersList() {}
/**
* @param {string} manufacturer
* @return {!Promise<!ModelsInfo>}
*/
- getCupsPrinterModelsList: function(manufacturer) {},
+ getCupsPrinterModelsList(manufacturer) {}
/**
* @param {!CupsPrinterInfo} newPrinter
* @return {!Promise<!PrinterMakeModel>}
*/
- getPrinterInfo: function(newPrinter) {},
- };
+ getPrinterInfo(newPrinter) {}
+ }
/**
- * @constructor
* @implements {settings.CupsPrintersBrowserProxy}
*/
- function CupsPrintersBrowserProxyImpl() {}
- cr.addSingletonGetter(CupsPrintersBrowserProxyImpl);
-
- CupsPrintersBrowserProxyImpl.prototype = {
+ class CupsPrintersBrowserProxyImpl {
/** @override */
- getCupsPrintersList: function() {
+ getCupsPrintersList() {
return cr.sendWithPromise('getCupsPrintersList');
- },
+ }
/** @override */
- updateCupsPrinter: function(printerId, printerName) {
+ updateCupsPrinter(printerId, printerName) {
chrome.send('updateCupsPrinter', [printerId, printerName]);
- },
+ }
/** @override */
- removeCupsPrinter: function(printerId, printerName) {
+ removeCupsPrinter(printerId, printerName) {
chrome.send('removeCupsPrinter', [printerId, printerName]);
- },
+ }
/** @override */
- addCupsPrinter: function(newPrinter) {
+ addCupsPrinter(newPrinter) {
chrome.send('addCupsPrinter', [newPrinter]);
- },
+ }
/** @override */
- getCupsPrinterPPDPath: function() {
+ getCupsPrinterPPDPath() {
return cr.sendWithPromise('selectPPDFile');
- },
+ }
/** @override */
- startDiscoveringPrinters: function() {
+ startDiscoveringPrinters() {
chrome.send('startDiscoveringPrinters');
- },
+ }
/** @override */
- stopDiscoveringPrinters: function() {
+ stopDiscoveringPrinters() {
chrome.send('stopDiscoveringPrinters');
- },
+ }
/** @override */
- getCupsPrinterManufacturersList: function() {
+ getCupsPrinterManufacturersList() {
return cr.sendWithPromise('getCupsPrinterManufacturersList');
- },
+ }
/** @override */
- getCupsPrinterModelsList: function(manufacturer) {
+ getCupsPrinterModelsList(manufacturer) {
return cr.sendWithPromise('getCupsPrinterModelsList', manufacturer);
- },
+ }
/** @override */
- getPrinterInfo: function(newPrinter) {
+ getPrinterInfo(newPrinter) {
return cr.sendWithPromise('getPrinterInfo', newPrinter);
- },
- };
+ }
+ }
+
+ cr.addSingletonGetter(CupsPrintersBrowserProxyImpl);
return {
CupsPrintersBrowserProxy: CupsPrintersBrowserProxy,

Powered by Google App Engine
This is Rietveld 408576698