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

Side by Side Diff: remoting/tools/javascript_key_tester/chord_tracker.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) 2014 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 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 /** 6 /**
7 * @constructor 7 * @constructor
8 * @param {HTMLElement} parentDiv 8 * @param {HTMLElement} parentDiv
9 */ 9 */
10 var ChordTracker = function(parentDiv) { 10 var ChordTracker = function(parentDiv) {
11 /** @type {HTMLElement} */ 11 /** @type {HTMLElement} */
12 this.parentDiv_ = parentDiv; 12 this.parentDiv_ = parentDiv;
13 /** @type {HTMLElement} */ 13 /** @type {HTMLElement} */
14 this.currentDiv_ = null; 14 this.currentDiv_ = null;
15 /** @type {Object.<HTMLElement>} */ 15 /** @type {Object<HTMLElement>} */
16 this.pressedKeys_ = {}; 16 this.pressedKeys_ = {};
17 }; 17 };
18 18
19 /** 19 /**
20 * @param {string} code The PNaCl "code" string. 20 * @param {string} code The PNaCl "code" string.
21 * @param {string} title 21 * @param {string} title
22 * @return {void} 22 * @return {void}
23 */ 23 */
24 ChordTracker.prototype.addKeyUpEvent = function(code, title) { 24 ChordTracker.prototype.addKeyUpEvent = function(code, title) {
25 var span = this.addSpanElement_('key-up', code, title); 25 var span = this.addSpanElement_('key-up', code, title);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 /** 107 /**
108 * @return {boolean} True if there are any keys pressed down. 108 * @return {boolean} True if there are any keys pressed down.
109 * @private 109 * @private
110 */ 110 */
111 ChordTracker.prototype.keysPressed_ = function() { 111 ChordTracker.prototype.keysPressed_ = function() {
112 for (var property in this.pressedKeys_) { 112 for (var property in this.pressedKeys_) {
113 return true; 113 return true;
114 } 114 }
115 return false; 115 return false;
116 }; 116 };
OLDNEW
« no previous file with comments | « native_client_sdk/src/examples/benchmarks/example.js ('k') | remoting/webapp/app_remoting/js/context_menu_dom.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698