| 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 Polymer({ | 5 Polymer({ |
| 6 is: 'settings-printing-page', | 6 is: 'settings-printing-page', |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 /** Preferences state. */ | 9 /** Preferences state. */ |
| 10 prefs: { | 10 prefs: { |
| 11 type: Object, | 11 type: Object, |
| 12 notify: true, | 12 notify: true, |
| 13 }, | 13 }, |
| 14 | 14 |
| 15 /** The current active route. */ | |
| 16 currentRoute: { | |
| 17 type: Object, | |
| 18 notify: true, | |
| 19 }, | |
| 20 | |
| 21 /** @type {!Array<!CupsPrinterInfo>} */ | 15 /** @type {!Array<!CupsPrinterInfo>} */ |
| 22 cupsPrinters: { | 16 cupsPrinters: { |
| 23 type: Array, | 17 type: Array, |
| 24 notify: true, | 18 notify: true, |
| 25 }, | 19 }, |
| 26 }, | 20 }, |
| 27 | 21 |
| 28 listeners: { | 22 listeners: { |
| 29 'show-cups-printer-details': 'onShowCupsPrinterDetailsPage_', | 23 'show-cups-printer-details': 'onShowCupsPrinterDetailsPage_', |
| 30 }, | 24 }, |
| 31 | 25 |
| 32 <if expr="chromeos"> | 26 <if expr="chromeos"> |
| 33 /** @private */ | 27 /** @private */ |
| 34 onTapCupsPrinters_: function() { | 28 onTapCupsPrinters_: function() { |
| 35 settings.navigateTo(settings.Route.CUPS_PRINTERS); | 29 settings.navigateTo(settings.Route.CUPS_PRINTERS); |
| 36 }, | 30 }, |
| 37 | 31 |
| 38 /** @private */ | 32 /** @private */ |
| 39 onShowCupsPrinterDetailsPage_: function(event) { | 33 onShowCupsPrinterDetailsPage_: function(event) { |
| 40 settings.navigateTo(settings.Route.CUPS_PRINTER_DETAIL); | 34 settings.navigateTo(settings.Route.CUPS_PRINTER_DETAIL); |
| 41 this.$.arraySelector.select(event.detail); | 35 this.$.arraySelector.select(event.detail); |
| 42 }, | 36 }, |
| 43 </if> | 37 </if> |
| 44 | 38 |
| 45 /** @private */ | 39 /** @private */ |
| 46 onTapCloudPrinters_: function() { | 40 onTapCloudPrinters_: function() { |
| 47 settings.navigateTo(settings.Route.CLOUD_PRINTERS); | 41 settings.navigateTo(settings.Route.CLOUD_PRINTERS); |
| 48 }, | 42 }, |
| 49 }); | 43 }); |
| OLD | NEW |