| 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 /** | 5 /** |
| 6 * Polymer class definition for 'oobe-i18n-dropdown'. | 6 * Polymer class definition for 'oobe-i18n-dropdown'. |
| 7 */ | 7 */ |
| 8 (function() { | 8 (function() { |
| 9 | 9 |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * List of languages/keyboards to display | 22 * List of languages/keyboards to display |
| 23 * @type {!Array<I18nMenuItem>} | 23 * @type {!Array<I18nMenuItem>} |
| 24 */ | 24 */ |
| 25 items: { | 25 items: { |
| 26 type: Array, | 26 type: Array, |
| 27 observer: 'onItemsChanged_', | 27 observer: 'onItemsChanged_', |
| 28 }, | 28 }, |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * ARIA-label for the selection menu. | 31 * ARIA-label for the selection menu. |
| 32 * |
| 33 * Note that we are not using "aria-label" property here, because |
| 34 * we want to pass the label value but not actually declare it as an |
| 35 * ARIA property anywhere but the actual target element. |
| 32 */ | 36 */ |
| 33 labelForAria: String, | 37 labelForAria: String, |
| 34 }, | 38 }, |
| 35 | 39 |
| 36 /** | 40 /** |
| 37 * Mapping from item id to item. | 41 * Mapping from item id to item. |
| 38 * @type {!Map<string,I18nMenuItem>} | 42 * @type {!Map<string,I18nMenuItem>} |
| 39 */ | 43 */ |
| 40 idToItem_: null, | 44 idToItem_: null, |
| 41 | 45 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 56 for (var i = 0; i < items.length; ++i) { | 60 for (var i = 0; i < items.length; ++i) { |
| 57 var item = items[i]; | 61 var item = items[i]; |
| 58 this.idToItem_.set(item.value, item); | 62 this.idToItem_.set(item.value, item); |
| 59 } | 63 } |
| 60 Oobe.setupSelect(this.$.select, | 64 Oobe.setupSelect(this.$.select, |
| 61 items, | 65 items, |
| 62 this.onSelected_.bind(this)); | 66 this.onSelected_.bind(this)); |
| 63 }, | 67 }, |
| 64 }); | 68 }); |
| 65 })(); | 69 })(); |
| OLD | NEW |