| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 onSelected_: function(value) { | 54 onSelected_: function(value) { |
| 55 this.fire('select-item', this.idToItem_.get(value)); | 55 this.fire('select-item', this.idToItem_.get(value)); |
| 56 }, | 56 }, |
| 57 | 57 |
| 58 onItemsChanged_: function(items) { | 58 onItemsChanged_: function(items) { |
| 59 this.idToItem_ = new Map(); | 59 this.idToItem_ = new Map(); |
| 60 for (var i = 0; i < items.length; ++i) { | 60 for (var i = 0; i < items.length; ++i) { |
| 61 var item = items[i]; | 61 var item = items[i]; |
| 62 this.idToItem_.set(item.value, item); | 62 this.idToItem_.set(item.value, item); |
| 63 } | 63 } |
| 64 Oobe.setupSelect(this.$.select, | 64 Oobe.setupSelect(this.$.select, items, this.onSelected_.bind(this)); |
| 65 items, | |
| 66 this.onSelected_.bind(this)); | |
| 67 }, | 65 }, |
| 68 }); | 66 }); |
| 69 })(); | 67 })(); |
| OLD | NEW |