| 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 * @fileoverview 'settings-add-languages-dialog' is a dialog for enabling | 6 * @fileoverview 'settings-add-languages-dialog' is a dialog for enabling |
| 7 * languages. | 7 * languages. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-add-languages-dialog', | 10 is: 'settings-add-languages-dialog', |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 onCancelButtonTap_: function() { | 103 onCancelButtonTap_: function() { |
| 104 this.$.dialog.close(); | 104 this.$.dialog.close(); |
| 105 }, | 105 }, |
| 106 | 106 |
| 107 /** | 107 /** |
| 108 * Enables the checked languages. | 108 * Enables the checked languages. |
| 109 * @private | 109 * @private |
| 110 */ | 110 */ |
| 111 onActionButtonTap_: function() { | 111 onActionButtonTap_: function() { |
| 112 this.$.dialog.close(); | 112 this.$.dialog.close(); |
| 113 for (var languageCode of this.languagesToAdd_) | 113 this.languagesToAdd_.forEach(function(language) { |
| 114 this.languageHelper.enableLanguage(languageCode); | 114 this.languageHelper.enableLanguage(language); |
| 115 }.bind(this)); |
| 115 }, | 116 }, |
| 116 }); | 117 }); |
| OLD | NEW |