OLD | NEW |
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-pointerdown="{{down}}" on-pointerup="{{up}}" on-pointerout="{{out}}" | 8 on-pointerdown="{{down}}" on-pointerup="{{up}}" on-pointerout="{{out}}" |
9 attributes="char invert repeat hintText toKeyset toLayout"> | 9 attributes="char invert repeat hintText toKeyset toLayout"> |
10 <script> | 10 <script> |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 detail.nextKeyset = this.keysetRules.down[NEXT_KEYSET - OFFSET]; | 212 detail.nextKeyset = this.keysetRules.down[NEXT_KEYSET - OFFSET]; |
213 } | 213 } |
214 break; | 214 break; |
215 default: | 215 default: |
216 break; | 216 break; |
217 } | 217 } |
218 return detail; | 218 return detail; |
219 }, | 219 }, |
220 | 220 |
221 generateLongPressTimer: function() { | 221 generateLongPressTimer: function() { |
222 return this.asyncMethod(function() { | 222 return this.async(function() { |
223 var detail = { | 223 var detail = { |
224 char: this.charValue, | 224 char: this.charValue, |
225 hintText: this.hintTextValue | 225 hintText: this.hintTextValue |
226 }; | 226 }; |
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> |
OLD | NEW |