| 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 <if expr="chromeos"> | 15 /* <if expr="chromeos"> */ |
| 16 /** | 16 /** |
| 17 * Whether to show CUPS printers settings. | 17 * Whether to show CUPS printers settings. |
| 18 * @private {boolean} | 18 * @private {boolean} |
| 19 */ | 19 */ |
| 20 showCupsPrintingFeatures_: { | 20 showCupsPrintingFeatures_: { |
| 21 type: Boolean, | 21 type: Boolean, |
| 22 value: function() { | 22 value: function() { |
| 23 return loadTimeData.getBoolean('showCupsPrintingFeatures'); | 23 return loadTimeData.getBoolean('showCupsPrintingFeatures'); |
| 24 }, | 24 }, |
| 25 }, | 25 }, |
| 26 </if> | 26 /* </if> */ |
| 27 | 27 |
| 28 /** @type {!Array<!CupsPrinterInfo>} */ | 28 /** @type {!Array<!CupsPrinterInfo>} */ |
| 29 cupsPrinters: { | 29 cupsPrinters: { |
| 30 type: Array, | 30 type: Array, |
| 31 notify: true, | 31 notify: true, |
| 32 }, | 32 }, |
| 33 | 33 |
| 34 searchTerm: { | 34 searchTerm: { |
| 35 type: String, | 35 type: String, |
| 36 }, | 36 }, |
| 37 }, | 37 }, |
| 38 | 38 |
| 39 listeners: { | 39 listeners: { |
| 40 'show-cups-printer-details': 'onShowCupsPrinterDetailsPage_', | 40 'show-cups-printer-details': 'onShowCupsPrinterDetailsPage_', |
| 41 }, | 41 }, |
| 42 | 42 |
| 43 <if expr="chromeos"> | 43 /* <if expr="chromeos"> */ |
| 44 /** @private */ | 44 /** @private */ |
| 45 onTapCupsPrinters_: function() { | 45 onTapCupsPrinters_: function() { |
| 46 settings.navigateTo(settings.Route.CUPS_PRINTERS); | 46 settings.navigateTo(settings.Route.CUPS_PRINTERS); |
| 47 }, | 47 }, |
| 48 | 48 |
| 49 /** @private */ | 49 /** @private */ |
| 50 onShowCupsPrinterDetailsPage_: function(event) { | 50 onShowCupsPrinterDetailsPage_: function(event) { |
| 51 settings.navigateTo(settings.Route.CUPS_PRINTER_DETAIL); | 51 settings.navigateTo(settings.Route.CUPS_PRINTER_DETAIL); |
| 52 this.$.arraySelector.select(event.detail); | 52 this.$.arraySelector.select(event.detail); |
| 53 }, | 53 }, |
| 54 </if> | 54 /* </if> */ |
| 55 | 55 |
| 56 /** @private */ | 56 /** @private */ |
| 57 onTapCloudPrinters_: function() { | 57 onTapCloudPrinters_: function() { |
| 58 settings.navigateTo(settings.Route.CLOUD_PRINTERS); | 58 settings.navigateTo(settings.Route.CLOUD_PRINTERS); |
| 59 }, | 59 }, |
| 60 }); | 60 }); |
| OLD | NEW |