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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/common/node_state.js

Issue 924083004: Shorten Closure template notation from Array.<*> to Array<*> in cvox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 The cvox.NodeState typedef. 6 * @fileoverview The cvox.NodeState typedef.
7 */ 7 */
8 8
9 goog.provide('cvox.NodeState'); 9 goog.provide('cvox.NodeState');
10 goog.provide('cvox.NodeStateUtil'); 10 goog.provide('cvox.NodeStateUtil');
11 11
12 /** 12 /**
13 * Holds the state of a node. It is an Array or Arrays of strings and numbers. 13 * Holds the state of a node. It is an Array or Arrays of strings and numbers.
14 * Each sub array is in the format: 14 * Each sub array is in the format:
15 * [state, opt_arg, opt_arg, ...]. These sub arrays map directly to a 15 * [state, opt_arg, opt_arg, ...]. These sub arrays map directly to a
16 * cvox.ChromeVox.getMsg() call. For example [list_position, 3, 5] maps to 16 * cvox.ChromeVox.getMsg() call. For example [list_position, 3, 5] maps to
17 * getMsg('list_position', [3, 5]); 17 * getMsg('list_position', [3, 5]);
18 * 18 *
19 * @typedef {!Array.<!Array.<string|number>>} 19 * @typedef {!Array<!Array<string|number>>}
20 */ 20 */
21 cvox.NodeState; 21 cvox.NodeState;
22 22
23 /** 23 /**
24 * Returns a localized, readable string with the NodeState. 24 * Returns a localized, readable string with the NodeState.
25 * 25 *
26 * NOTE(deboer): Once AriaUtil and DomUtil are using NodeState exclusively, this 26 * NOTE(deboer): Once AriaUtil and DomUtil are using NodeState exclusively, this
27 * function can be moved into DescriptionUtil, removing the cvox.ChromeVox 27 * function can be moved into DescriptionUtil, removing the cvox.ChromeVox
28 * dependency here. 28 * dependency here.
29 * 29 *
(...skipping 11 matching lines...) Expand all
41 return cvox.ChromeVox.msgs.getNumber(a); 41 return cvox.ChromeVox.msgs.getNumber(a);
42 } 42 }
43 return a; 43 return a;
44 }); 44 });
45 return cvox.ChromeVox.msgs.getMsg(/** @type {string} */ (s[0]), args); 45 return cvox.ChromeVox.msgs.getMsg(/** @type {string} */ (s[0]), args);
46 }).join(' '); 46 }).join(' ');
47 } catch (e) { 47 } catch (e) {
48 throw new Error('error: ' + e + ' state: ' + state); 48 throw new Error('error: ' + e + ' state: ' + state);
49 } 49 }
50 }; 50 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698