onPrintersAdded_(type, printers) {
      if (type == print_preview.PrinterType.PRIVET_PRINTER) {
        const printer =
            /** !print_preview.PrivetPrinterDescription */ (printers[0]);
        if (printer.serviceName == this.waitForRegisterDestination_ &&
            !printer.isUnregistered) {
          this.waitForRegisterDestination_ = null;
          this.onDestinationsReload();
          return;
        }
      }
      this.insertDestinations_(printers.map(
          printer => print_preview.parseDestination(type, printer)));
    }
/**
     * Called when a printer or printers are detected after sending getPrinters
     * from the native layer.
     * @param {print_preview.PrinterType} type The type of printer(s) added.
     * @param {!Array<!print_preview.LocalDestinationInfo |
     *                !print_preview.PrivetPrinterDescription |
     *                !print_preview.ProvisionalDestinationInfo>} printers
     *     Information about the printers that have been retrieved.
     */
Called when a printer or printers are detected after sending getPrinters
from the native layer.
Called when a printer or printers are detected after sending getPrinters from the native layer .
onPrintersAdded_(type, printers) {
      if (type == print_preview.PrinterType.PRIVET_PRINTER) {
        const printer =
             (printers[0]);
        if (printer.serviceName == this.waitForRegisterDestination_ &&
            !printer.isUnregistered) {
          this.waitForRegisterDestination_ = null;
          this.onDestinationsReload();
          return;
        }
      }
      this.insertDestinations_(printers.map(
          printer => print_preview.parseDestination(type, printer)));
    }
onPrintersAdded_ ( type , printers ) { if ( type == print_preview . PrinterType . PRIVET_PRINTER ) { const printer = ( printers [ 0 ] ) ; if ( printer . serviceName == this . waitForRegisterDestination_ && ! printer . isUnregistered ) { this . waitForRegisterDestination_ = null ; this . onDestinationsReload ( ) ; return ; } } this . insertDestinations_ ( printers . map ( printer => print_preview . parseDestination ( type , printer ) ) ) ; }
Called when a printer or printers are detected after sending getPrinters
 from the native layer.
Called when a printer or printers are detected after sending getPrinters from the native layer .
/** !print_preview.PrivetPrinterDescription */