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

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

Issue 183893033: Use a sound pool instead of a single audio tag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@consistant-css
Patch Set: Created 6 years, 9 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 <!-- 1 <!--
2 -- Copyright 2013 The Chromium Authors. All rights reserved. 2 -- Copyright 2013 The Chromium Authors. All rights reserved.
3 -- Use of this source code is governed by a BSD-style license that can be 3 -- Use of this source code is governed by a BSD-style license that can be
4 -- found in the LICENSE file. 4 -- found in the LICENSE file.
5 --> 5 -->
6 6
7 <polymer-element name="kb-key-base" 7 <polymer-element name="kb-key-base"
8 on-pointerout="{{out}}" 8 on-pointerout="{{out}}"
9 attributes="char invert repeat hintText toKeyset toLayout"> 9 attributes="char invert repeat hintText toKeyset toLayout">
10 <script> 10 <script>
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 */ 174 */
175 get hintTextValue() { 175 get hintTextValue() {
176 return this.invert ? (this.char || this.textContent) : this.hintText; 176 return this.invert ? (this.char || this.textContent) : this.hintText;
177 }, 177 },
178 178
179 /** 179 /**
180 * Handles a swipe flick that originated from this key. 180 * Handles a swipe flick that originated from this key.
181 * @param {detail} The details of the swipe. 181 * @param {detail} The details of the swipe.
182 */ 182 */
183 onFlick: function(detail) { 183 onFlick: function(detail) {
184 if (!(detail.direction & SWIPE_DIRECTION.UP) || !this.hintTextValue) 184 if (!(detail.direction & SwipeDirection.UP) || !this.hintTextValue)
rsadam 2014/03/05 19:57:47 Drive by fix.
185 return; 185 return;
186 var typeDetails = {char: this.hintTextValue}; 186 var typeDetails = {char: this.hintTextValue};
187 this.fire('type-key', typeDetails); 187 this.fire('type-key', typeDetails);
188 }, 188 },
189 189
190 /** 190 /**
191 * Returns a subset of the key attributes. 191 * Returns a subset of the key attributes.
192 * @param {string} caller The id of the function which called 192 * @param {string} caller The id of the function which called
193 * populateDetails. 193 * populateDetails.
194 */ 194 */
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 if (this.keysetRules && this.keysetRules.long != undefined) { 227 if (this.keysetRules && this.keysetRules.long != undefined) {
228 detail.toKeyset = this.keysetRules.long[TO_KEYSET - OFFSET]; 228 detail.toKeyset = this.keysetRules.long[TO_KEYSET - OFFSET];
229 detail.nextKeyset = this.keysetRules.long[NEXT_KEYSET - OFFSET]; 229 detail.nextKeyset = this.keysetRules.long[NEXT_KEYSET - OFFSET];
230 } 230 }
231 this.fire('key-longpress', detail); 231 this.fire('key-longpress', detail);
232 }, null, LONGPRESS_DELAY_MSEC); 232 }, null, LONGPRESS_DELAY_MSEC);
233 }, 233 },
234 }); 234 });
235 </script> 235 </script>
236 </polymer-element> 236 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698