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

Side by Side Diff: chrome/browser/resources/options/language_options.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 // TODO(kochi): Generalize the notification as a component and put it 5 // TODO(kochi): Generalize the notification as a component and put it
6 // in js/cr/ui/notification.js . 6 // in js/cr/ui/notification.js .
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 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 // necessary as a language code for Translate server. 1342 // necessary as a language code for Translate server.
1343 return languageCode; 1343 return languageCode;
1344 } 1344 }
1345 1345
1346 return main; 1346 return main;
1347 }, 1347 },
1348 }; 1348 };
1349 1349
1350 /** 1350 /**
1351 * Shows the node at |index| in |nodes|, hides all others. 1351 * Shows the node at |index| in |nodes|, hides all others.
1352 * @param {Array.<HTMLElement>} nodes The nodes to be shown or hidden. 1352 * @param {Array<HTMLElement>} nodes The nodes to be shown or hidden.
1353 * @param {number} index The index of |nodes| to show. 1353 * @param {number} index The index of |nodes| to show.
1354 */ 1354 */
1355 function showMutuallyExclusiveNodes(nodes, index) { 1355 function showMutuallyExclusiveNodes(nodes, index) {
1356 assert(index >= 0 && index < nodes.length); 1356 assert(index >= 0 && index < nodes.length);
1357 for (var i = 0; i < nodes.length; ++i) { 1357 for (var i = 0; i < nodes.length; ++i) {
1358 assert(nodes[i] instanceof HTMLElement); // TODO(dbeam): Ignore null? 1358 assert(nodes[i] instanceof HTMLElement); // TODO(dbeam): Ignore null?
1359 nodes[i].hidden = i != index; 1359 nodes[i].hidden = i != index;
1360 } 1360 }
1361 } 1361 }
1362 1362
(...skipping 11 matching lines...) Expand all
1374 1374
1375 LanguageOptions.onDictionaryDownloadFailure = function(languageCode) { 1375 LanguageOptions.onDictionaryDownloadFailure = function(languageCode) {
1376 LanguageOptions.getInstance().onDictionaryDownloadFailure_(languageCode); 1376 LanguageOptions.getInstance().onDictionaryDownloadFailure_(languageCode);
1377 }; 1377 };
1378 1378
1379 // Export 1379 // Export
1380 return { 1380 return {
1381 LanguageOptions: LanguageOptions 1381 LanguageOptions: LanguageOptions
1382 }; 1382 };
1383 }); 1383 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698