| 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-modifier-key" class="unlocked dark" extends="kb-key"> | 7 <polymer-element name="kb-modifier-key" class="unlocked dark" extends="kb-key"> |
| 8 <script> | 8 <script> |
| 9 (function () { | 9 (function () { |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 /** | 58 /** |
| 59 * Returns whether the modifier for this key is active. | 59 * Returns whether the modifier for this key is active. |
| 60 * @return {boolean} | 60 * @return {boolean} |
| 61 */ | 61 */ |
| 62 isActive: function() { | 62 isActive: function() { |
| 63 return this.state != KEY_STATES.UNLOCKED; | 63 return this.state != KEY_STATES.UNLOCKED; |
| 64 }, | 64 }, |
| 65 | 65 |
| 66 /** | 66 /** |
| 67 * Notifies key that a non-control keyed up. | 67 * Notifies key that a non-control keyed was typed. |
| 68 * A control key is defined as one of shift, control or alt. | 68 * A control key is defined as one of shift, control or alt. |
| 69 */ | 69 */ |
| 70 onNonControlKeyUp: function() { | 70 onNonControlKeyTyped: function() { |
| 71 switch(this.state) { | 71 switch(this.state) { |
| 72 case (KEY_STATES.TAPPED): | 72 case (KEY_STATES.TAPPED): |
| 73 this.state = KEY_STATES.UNLOCKED; | 73 this.state = KEY_STATES.UNLOCKED; |
| 74 break; | 74 break; |
| 75 } | 75 } |
| 76 }, | 76 }, |
| 77 | 77 |
| 78 populateDetails: function(caller) { | 78 populateDetails: function(caller) { |
| 79 var detail = this.super([caller]); | 79 var detail = this.super([caller]); |
| 80 if (this.state != KEY_STATES.UNLOCKED) | 80 if (this.state != KEY_STATES.UNLOCKED) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 99 return states[this.innerText]; | 99 return states[this.innerText]; |
| 100 }, | 100 }, |
| 101 | 101 |
| 102 set state(value) { | 102 set state(value) { |
| 103 states[this.innerText] = value; | 103 states[this.innerText] = value; |
| 104 } | 104 } |
| 105 }); | 105 }); |
| 106 })(); | 106 })(); |
| 107 </script> | 107 </script> |
| 108 </polymer-element> | 108 </polymer-element> |
| OLD | NEW |