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 [ | 164 cr.makePublic(KeyboardOverlay, [ |
165 'showCapsLockOptions', | 165 'showCapsLockOptions', |
166 'showDiamondKeyOptions', | 166 'showDiamondKeyOptions', |
167 ].forEach(function(name) { | 167 ]); |
168 KeyboardOverlay[name] = function() { | |
169 var instance = KeyboardOverlay.getInstance(); | |
170 return instance[name + '_'].apply(instance, arguments); | |
171 }; | |
172 }); | |
173 | 168 |
174 // Export | 169 // Export |
175 return { | 170 return { |
176 KeyboardOverlay: KeyboardOverlay | 171 KeyboardOverlay: KeyboardOverlay |
177 }; | 172 }; |
178 }); | 173 }); |
OLD | NEW |