| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** 'add-printers-list' is the list of discovered printers. */ |
| 6 Polymer({ |
| 7 is: 'add-printer-list', |
| 8 |
| 9 properties: { |
| 10 /** @type {!Array<!CupsPrinterInfo>} */ |
| 11 printers: { |
| 12 type: Array, |
| 13 notify: true, |
| 14 }, |
| 15 |
| 16 /** @type {!CupsPrinterInfo} */ |
| 17 selectedPrinter: { |
| 18 type: Object, |
| 19 notify: true, |
| 20 }, |
| 21 }, |
| 22 |
| 23 /** |
| 24 * @param {{model:Object}} event |
| 25 * @private |
| 26 */ |
| 27 onSelect_: function(event) { |
| 28 this.selectedPrinter = event.model.item; |
| 29 }, |
| 30 }); |
| 31 |
| 32 /** 'add-printer-dialog' is the template of the Add Printer dialog. */ |
| 33 Polymer({ |
| 34 is: 'add-printer-dialog', |
| 35 |
| 36 /** @private */ |
| 37 attached: function() { |
| 38 this.$.dialog.showModal(); |
| 39 }, |
| 40 |
| 41 close: function() { |
| 42 this.$.dialog.close(); |
| 43 }, |
| 44 }); |
| OLD | NEW |