| 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-shift-key" | 7 <polymer-element name="kb-shift-key" |
| 8 attributes="lowerCaseKeysetId upperCaseKeysetId" | 8 attributes="lowerCaseKeysetId upperCaseKeysetId" |
| 9 class="shift dark" char="Shift" on-pointerout="{{out}}" extends="kb-key"> | 9 class="shift dark" char="Shift" on-pointerout="{{out}}" extends="kb-key"> |
| 10 <script> | 10 <script> |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Populate double click transition details. | 122 // Populate double click transition details. |
| 123 var detail = {}; | 123 var detail = {}; |
| 124 detail.char = this.char || this.textContent; | 124 detail.char = this.char || this.textContent; |
| 125 detail.toKeyset = this.upperCaseKeysetId; | 125 detail.toKeyset = this.upperCaseKeysetId; |
| 126 detail.nextKeyset = undefined; | 126 detail.nextKeyset = undefined; |
| 127 detail.callback = this.onDoubleClick; | 127 detail.callback = this.onDoubleClick; |
| 128 this.fire('enable-dbl', detail); | 128 this.fire('enable-dbl', detail); |
| 129 }, | 129 }, |
| 130 | 130 |
| 131 generateLongPressTimer: function() { | 131 generateLongPressTimer: function() { |
| 132 return this.asyncMethod(function() { | 132 return this.async(function() { |
| 133 var detail = this.populateDetails(); | 133 var detail = this.populateDetails(); |
| 134 if (state == KEY_STATES.LOCKED) { | 134 if (state == KEY_STATES.LOCKED) { |
| 135 // We don't care about the longpress if we are already | 135 // We don't care about the longpress if we are already |
| 136 // capitalized. | 136 // capitalized. |
| 137 return; | 137 return; |
| 138 } else { | 138 } else { |
| 139 state = KEY_STATES.LOCKED; | 139 state = KEY_STATES.LOCKED; |
| 140 detail.toKeyset = this.upperCaseKeysetId; | 140 detail.toKeyset = this.upperCaseKeysetId; |
| 141 detail.nextKeyset = undefined; | 141 detail.nextKeyset = undefined; |
| 142 } | 142 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 case KEY_STATES.UNLOCKED: | 245 case KEY_STATES.UNLOCKED: |
| 246 return this.lowerCaseKeysetId; | 246 return this.lowerCaseKeysetId; |
| 247 default: | 247 default: |
| 248 return this.upperCaseKeysetId; | 248 return this.upperCaseKeysetId; |
| 249 } | 249 } |
| 250 }, | 250 }, |
| 251 }); | 251 }); |
| 252 })(); | 252 })(); |
| 253 </script> | 253 </script> |
| 254 </polymer-element> | 254 </polymer-element> |
| OLD | NEW |