Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Side by Side Diff: chrome/browser/resources/options/chromeos_language_list.js

Issue 3193001: Fix "Languages and Input" options. (Closed)
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/options/chromeos_language_options.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 cr.define('options.language', function() { 5 cr.define('options.language', function() {
6 const ArrayDataModel = cr.ui.ArrayDataModel; 6 const ArrayDataModel = cr.ui.ArrayDataModel;
7 const LanguageOptions = options.LanguageOptions; 7 const LanguageOptions = options.LanguageOptions;
8 const List = cr.ui.List; 8 const List = cr.ui.List;
9 const ListItem = cr.ui.ListItem; 9 const ListItem = cr.ui.ListItem;
10 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 10 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // Save the preference. 221 // Save the preference.
222 this.savePreference_(); 222 this.savePreference_();
223 }, 223 },
224 224
225 /** 225 /**
226 * Handles pref change. 226 * Handles pref change.
227 * @param {Event} e The change event object. 227 * @param {Event} e The change event object.
228 * @private 228 * @private
229 */ 229 */
230 handlePrefChange_: function(e) { 230 handlePrefChange_: function(e) {
231 var languageCodesInCsv = e.value; 231 var languageCodesInCsv = e.value.value;
232 var languageCodes = this.filterBadLanguageCodes_( 232 var languageCodes = this.filterBadLanguageCodes_(
233 languageCodesInCsv.split(',')); 233 languageCodesInCsv.split(','));
234 this.load_(languageCodes); 234 this.load_(languageCodes);
235 }, 235 },
236 236
237 /** 237 /**
238 * Loads given language list. 238 * Loads given language list.
239 * @param {Array} languageCodes List of language codes. 239 * @param {Array} languageCodes List of language codes.
240 * @private 240 * @private
241 */ 241 */
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 288 }
289 } 289 }
290 return filteredLanguageCodes; 290 return filteredLanguageCodes;
291 }, 291 },
292 }; 292 };
293 293
294 return { 294 return {
295 LanguageList: LanguageList 295 LanguageList: LanguageList
296 }; 296 };
297 }); 297 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/chromeos_language_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698