| 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: { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 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 |
| 38 /** @private {!Map<string, string>} */ |
| 39 focusConfig_: { |
| 40 type: Object, |
| 41 value: function() { |
| 42 var map = new Map(); |
| 43 map.set( |
| 44 settings.Route.CLOUD_PRINTERS.path, |
| 45 '#cloudPrinters .subpage-arrow'); |
| 46 // <if expr="chromeos"> |
| 47 map.set( |
| 48 settings.Route.CUPS_PRINTERS.path, '#cupsPrinters .subpage-arrow'); |
| 49 // </if> |
| 50 return map; |
| 51 }, |
| 52 }, |
| 37 }, | 53 }, |
| 38 | 54 |
| 39 listeners: { | 55 listeners: { |
| 40 'show-cups-printer-details': 'onShowCupsPrinterDetailsPage_', | 56 'show-cups-printer-details': 'onShowCupsPrinterDetailsPage_', |
| 41 }, | 57 }, |
| 42 | 58 |
| 43 // <if expr="chromeos"> | 59 // <if expr="chromeos"> |
| 44 /** @private */ | 60 /** @private */ |
| 45 onTapCupsPrinters_: function() { | 61 onTapCupsPrinters_: function() { |
| 46 settings.navigateTo(settings.Route.CUPS_PRINTERS); | 62 settings.navigateTo(settings.Route.CUPS_PRINTERS); |
| 47 }, | 63 }, |
| 48 | 64 |
| 49 /** @private */ | 65 /** @private */ |
| 50 onShowCupsPrinterDetailsPage_: function(event) { | 66 onShowCupsPrinterDetailsPage_: function(event) { |
| 51 settings.navigateTo(settings.Route.CUPS_PRINTER_DETAIL); | 67 settings.navigateTo(settings.Route.CUPS_PRINTER_DETAIL); |
| 52 this.$.arraySelector.select(event.detail); | 68 this.$.arraySelector.select(event.detail); |
| 53 }, | 69 }, |
| 54 // </if> | 70 // </if> |
| 55 | 71 |
| 56 /** @private */ | 72 /** @private */ |
| 57 onTapCloudPrinters_: function() { | 73 onTapCloudPrinters_: function() { |
| 58 settings.navigateTo(settings.Route.CLOUD_PRINTERS); | 74 settings.navigateTo(settings.Route.CLOUD_PRINTERS); |
| 59 }, | 75 }, |
| 60 }); | 76 }); |
| OLD | NEW |