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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/common/key_util.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 A collection of JavaScript utilities used to simplify working 6 * @fileoverview A collection of JavaScript utilities used to simplify working
7 * with keyboard events. 7 * with keyboard events.
8 */ 8 */
9 9
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 case 'Cmd': 192 case 'Cmd':
193 case 'Win': 193 case 'Win':
194 return 91; 194 return 91;
195 } 195 }
196 return -1; 196 return -1;
197 }; 197 };
198 198
199 /** 199 /**
200 * Returns the key codes of a string respresentation of the ChromeVox modifiers. 200 * Returns the key codes of a string respresentation of the ChromeVox modifiers.
201 * 201 *
202 * @return {Array.<number>} Array of key codes. 202 * @return {Array<number>} Array of key codes.
203 */ 203 */
204 cvox.KeyUtil.cvoxModKeyCodes = function() { 204 cvox.KeyUtil.cvoxModKeyCodes = function() {
205 var modKeyCombo = cvox.ChromeVox.modKeyStr.split(/\+/g); 205 var modKeyCombo = cvox.ChromeVox.modKeyStr.split(/\+/g);
206 var modKeyCodes = modKeyCombo.map(function(keyString) { 206 var modKeyCodes = modKeyCombo.map(function(keyString) {
207 return cvox.KeyUtil.modStringToKeyCode(keyString); 207 return cvox.KeyUtil.modStringToKeyCode(keyString);
208 }); 208 });
209 return modKeyCodes; 209 return modKeyCodes;
210 }; 210 };
211 211
212 /** 212 /**
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 key.doubleTap = true; 483 key.doubleTap = true;
484 for (var i = 0, keySeq; keySeq = cvox.KeySequence.doubleTapCache[i]; i++) { 484 for (var i = 0, keySeq; keySeq = cvox.KeySequence.doubleTapCache[i]; i++) {
485 if (keySeq.equals(key)) { 485 if (keySeq.equals(key)) {
486 isSet = true; 486 isSet = true;
487 break; 487 break;
488 } 488 }
489 } 489 }
490 key.doubleTap = originalState; 490 key.doubleTap = originalState;
491 return isSet; 491 return isSet;
492 }; 492 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698