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 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
7 /** @const */ var SettingsDialog = options.SettingsDialog; | 7 /** @const */ var SettingsDialog = options.SettingsDialog; |
8 | 8 |
9 /** | 9 /** |
10 * StartupOverlay class | 10 * StartupOverlay class |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // current list, do nothing. | 148 // current list, do nothing. |
149 if (list.targetInput && list.selectedItem && | 149 if (list.targetInput && list.selectedItem && |
150 list.selectedItem.url == list.targetInput.value) { | 150 list.selectedItem.url == list.targetInput.value) { |
151 return; | 151 return; |
152 } | 152 } |
153 list.suggestions = suggestions; | 153 list.suggestions = suggestions; |
154 }, | 154 }, |
155 }; | 155 }; |
156 | 156 |
157 // Forward public APIs to private implementations. | 157 // Forward public APIs to private implementations. |
158 [ | 158 cr.makePublic(StartupOverlay, [ |
159 'updateStartupPages', | 159 'updateStartupPages', |
160 'updateAutocompleteSuggestions', | 160 'updateAutocompleteSuggestions', |
161 ].forEach(function(name) { | 161 ]); |
162 StartupOverlay[name] = function() { | |
163 var instance = StartupOverlay.getInstance(); | |
164 return instance[name + '_'].apply(instance, arguments); | |
165 }; | |
166 }); | |
167 | 162 |
168 // Export | 163 // Export |
169 return { | 164 return { |
170 StartupOverlay: StartupOverlay | 165 StartupOverlay: StartupOverlay |
171 }; | 166 }; |
172 }); | 167 }); |
OLD | NEW |