| 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 'settings-cups-add-printer-dialog' includes multiple dialogs to | 6 * @fileoverview 'settings-cups-add-printer-dialog' includes multiple dialogs to |
| 7 * set up a new CUPS printer. | 7 * set up a new CUPS printer. |
| 8 * Subdialogs include: | 8 * Subdialogs include: |
| 9 * - 'add-printer-discovery-dialog' is a dialog showing discovered printers on | 9 * - 'add-printer-discovery-dialog' is a dialog showing discovered printers on |
| 10 * the network that are available for setup. | 10 * the network that are available for setup. |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 this.switchDialog_( | 461 this.switchDialog_( |
| 462 this.currentDialog_, AddPrinterDialogs.CONFIGURING, | 462 this.currentDialog_, AddPrinterDialogs.CONFIGURING, |
| 463 'showConfiguringDialog_'); | 463 'showConfiguringDialog_'); |
| 464 if (this.previousDialog_ == AddPrinterDialogs.DISCOVERY) { | 464 if (this.previousDialog_ == AddPrinterDialogs.DISCOVERY) { |
| 465 this.configuringDialogTitle = | 465 this.configuringDialogTitle = |
| 466 loadTimeData.getString('addPrintersNearbyTitle'); | 466 loadTimeData.getString('addPrintersNearbyTitle'); |
| 467 this.addPrinter_(); | 467 this.addPrinter_(); |
| 468 } else if ( | 468 } else if ( |
| 469 this.previousDialog_ == AddPrinterDialogs.MANUFACTURER) { | 469 this.previousDialog_ == AddPrinterDialogs.MANUFACTURER) { |
| 470 this.configuringDialogTitle = | 470 this.configuringDialogTitle = |
| 471 loadTimeData.getString('addPrintersManuallyTitle'); | 471 loadTimeData.getString('selectManufacturerAndModelTitle'); |
| 472 this.addPrinter_(); | 472 this.addPrinter_(); |
| 473 } else if (this.previousDialog_ == AddPrinterDialogs.MANUALLY) { | 473 } else if (this.previousDialog_ == AddPrinterDialogs.MANUALLY) { |
| 474 this.configuringDialogTitle = | 474 this.configuringDialogTitle = |
| 475 loadTimeData.getString('addPrintersManuallyTitle'); | 475 loadTimeData.getString('addPrintersManuallyTitle'); |
| 476 if (this.newPrinter.printerProtocol == 'ipp' || | 476 if (this.newPrinter.printerProtocol == 'ipp' || |
| 477 this.newPrinter.printerProtocol == 'ipps') { | 477 this.newPrinter.printerProtocol == 'ipps') { |
| 478 settings.CupsPrintersBrowserProxyImpl.getInstance(). | 478 settings.CupsPrintersBrowserProxyImpl.getInstance(). |
| 479 getPrinterInfo(this.newPrinter). | 479 getPrinterInfo(this.newPrinter). |
| 480 then( | 480 then( |
| 481 this.onPrinterFound_.bind(this), this.infoFailed_.bind(this)); | 481 this.onPrinterFound_.bind(this), this.infoFailed_.bind(this)); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 onAddPrinter_: function(success, printerName) { | 541 onAddPrinter_: function(success, printerName) { |
| 542 this.$$('add-printer-configuring-dialog').close(); | 542 this.$$('add-printer-configuring-dialog').close(); |
| 543 if (success) | 543 if (success) |
| 544 return; | 544 return; |
| 545 | 545 |
| 546 if (this.previousDialog_ == AddPrinterDialogs.MANUFACTURER) { | 546 if (this.previousDialog_ == AddPrinterDialogs.MANUFACTURER) { |
| 547 this.setupFailed = true; | 547 this.setupFailed = true; |
| 548 } | 548 } |
| 549 }, | 549 }, |
| 550 }); | 550 }); |
| OLD | NEW |