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