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

Side by Side Diff: ui/keyboard/resources/elements/kb-key-base.js

Issue 594603002: Compile ui/keyboard/ JS, part 1: remove all warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: Created 6 years, 2 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 * The long-press delay in milliseconds before long-press handler is 6 * The long-press delay in milliseconds before long-press handler is
7 * invoked. 7 * invoked.
8 * @const 8 * @const
9 * @type {number} 9 * @type {number}
10 */ 10 */
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 * Hint text value associated with the key. Typically, the value is a 165 * Hint text value associated with the key. Typically, the value is a
166 * single character. 166 * single character.
167 * @return {string} 167 * @return {string}
168 */ 168 */
169 get hintTextValue() { 169 get hintTextValue() {
170 return this.invert ? (this.char || this.textContent) : this.hintText; 170 return this.invert ? (this.char || this.textContent) : this.hintText;
171 }, 171 },
172 172
173 /** 173 /**
174 * Handles a swipe flick that originated from this key. 174 * Handles a swipe flick that originated from this key.
175 * @param {detail} The details of the swipe. 175 * @param {detail} detail The details of the swipe.
176 */ 176 */
177 onFlick: function(detail) { 177 onFlick: function(detail) {
178 if (!(detail.direction & SwipeDirection.UP) || !this.hintTextValue) 178 if (!(detail.direction & SwipeDirection.UP) || !this.hintTextValue)
179 return; 179 return;
180 var typeDetails = {char: this.hintTextValue}; 180 var typeDetails = {char: this.hintTextValue};
181 this.fire('type-key', typeDetails); 181 this.fire('type-key', typeDetails);
182 }, 182 },
183 183
184 /** 184 /**
185 * Returns a subset of the key attributes. 185 * Returns a subset of the key attributes.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 hintText: this.hintTextValue 219 hintText: this.hintTextValue
220 }; 220 };
221 if (this.keysetRules && this.keysetRules.long != undefined) { 221 if (this.keysetRules && this.keysetRules.long != undefined) {
222 detail.toKeyset = this.keysetRules.long[TO_KEYSET - OFFSET]; 222 detail.toKeyset = this.keysetRules.long[TO_KEYSET - OFFSET];
223 detail.nextKeyset = this.keysetRules.long[NEXT_KEYSET - OFFSET]; 223 detail.nextKeyset = this.keysetRules.long[NEXT_KEYSET - OFFSET];
224 } 224 }
225 this.fire('key-longpress', detail); 225 this.fire('key-longpress', detail);
226 }, null, LONGPRESS_DELAY_MSEC); 226 }, null, LONGPRESS_DELAY_MSEC);
227 }, 227 },
228 }); 228 });
OLDNEW
« no previous file with comments | « ui/keyboard/resources/elements/kb-altkey-data.js ('k') | ui/keyboard/resources/elements/kb-keyboard.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698