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

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

Issue 917093003: Shorten Closure template notation from Array.<*> to Array<*>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove cvox Created 5 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // AddLanguageOverlay class: 6 // AddLanguageOverlay class:
7 7
8 cr.define('options', function() { 8 cr.define('options', function() {
9 /** @const */ var Page = cr.ui.pageManager.Page; 9 /** @const */ var Page = cr.ui.pageManager.Page;
10 /** @const */ var PageManager = cr.ui.pageManager.PageManager; 10 /** @const */ var PageManager = cr.ui.pageManager.PageManager;
(...skipping 20 matching lines...) Expand all
31 Page.prototype.initializePage.call(this); 31 Page.prototype.initializePage.call(this);
32 32
33 // Set up the cancel button. 33 // Set up the cancel button.
34 $('add-language-overlay-cancel-button').onclick = function(e) { 34 $('add-language-overlay-cancel-button').onclick = function(e) {
35 PageManager.closeOverlay(); 35 PageManager.closeOverlay();
36 }; 36 };
37 37
38 // Create the language list with which users can add a language. 38 // Create the language list with which users can add a language.
39 var addLanguageList = $('add-language-overlay-language-list'); 39 var addLanguageList = $('add-language-overlay-language-list');
40 /** 40 /**
41 * @type {Array.<{code: string, displayName: string, 41 * @type {Array<{code: string, displayName: string,
42 * textDirection: string, nativeDisplayName: string}>} 42 * textDirection: string, nativeDisplayName: string}>}
43 * @see chrome/browser/ui/webui/options/language_options_handler.cc 43 * @see chrome/browser/ui/webui/options/language_options_handler.cc
44 */ 44 */
45 var languageListData = loadTimeData.getValue('languageList'); 45 var languageListData = loadTimeData.getValue('languageList');
46 for (var i = 0; i < languageListData.length; i++) { 46 for (var i = 0; i < languageListData.length; i++) {
47 var language = languageListData[i]; 47 var language = languageListData[i];
48 var displayText = language.displayName; 48 var displayText = language.displayName;
49 // If the native name is different, add it. 49 // If the native name is different, add it.
50 if (language.displayName != language.nativeDisplayName) 50 if (language.displayName != language.nativeDisplayName)
51 displayText += ' - ' + language.nativeDisplayName; 51 displayText += ' - ' + language.nativeDisplayName;
52 52
53 var option = cr.doc.createElement('option'); 53 var option = cr.doc.createElement('option');
54 option.value = language.code; 54 option.value = language.code;
55 option.textContent = displayText; 55 option.textContent = displayText;
56 addLanguageList.appendChild(option); 56 addLanguageList.appendChild(option);
57 } 57 }
58 }, 58 },
59 }; 59 };
60 60
61 return { 61 return {
62 AddLanguageOverlay: AddLanguageOverlay 62 AddLanguageOverlay: AddLanguageOverlay
63 }; 63 };
64 }); 64 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/handler_options.js ('k') | chrome/browser/resources/options/language_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698