OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 | 6 |
7 /** | 7 /** |
8 * Auto-repeat delays (in ms) for the corresponding slider values, from | 8 * Auto-repeat delays (in ms) for the corresponding slider values, from |
9 * long to short. The values were chosen to provide a large range while giving | 9 * long to short. The values were chosen to provide a large range while giving |
10 * several options near the defaults. | 10 * several options near the defaults. |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 assert(index != -1, | 155 assert(index != -1, |
156 'Failed to update ' + id + ' from pref with value ' + value); | 156 'Failed to update ' + id + ' from pref with value ' + value); |
157 } | 157 } |
158 | 158 |
159 $(id).value = index; | 159 $(id).value = index; |
160 }, | 160 }, |
161 }; | 161 }; |
162 | 162 |
163 // Forward public APIs to private implementations. | 163 // Forward public APIs to private implementations. |
164 cr.makePublic(KeyboardOverlay, [ | 164 [ |
165 'showCapsLockOptions', | 165 'showCapsLockOptions', |
166 'showDiamondKeyOptions', | 166 'showDiamondKeyOptions', |
167 ]); | 167 ].forEach(function(name) { |
| 168 KeyboardOverlay[name] = function() { |
| 169 var instance = KeyboardOverlay.getInstance(); |
| 170 return instance[name + '_'].apply(instance, arguments); |
| 171 }; |
| 172 }); |
168 | 173 |
169 // Export | 174 // Export |
170 return { | 175 return { |
171 KeyboardOverlay: KeyboardOverlay | 176 KeyboardOverlay: KeyboardOverlay |
172 }; | 177 }; |
173 }); | 178 }); |
OLD | NEW |