| 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 OptionsPage = options.OptionsPage; | 7 /** @const */ var OptionsPage = options.OptionsPage; |
| 8 /** @const */ var SettingsDialog = options.SettingsDialog; | 8 /** @const */ var SettingsDialog = options.SettingsDialog; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 }, | 118 }, |
| 119 | 119 |
| 120 /** | 120 /** |
| 121 * Updates the startup pages list with the given entries. | 121 * Updates the startup pages list with the given entries. |
| 122 * @param {Array} pages List of startup pages. | 122 * @param {Array} pages List of startup pages. |
| 123 * @private | 123 * @private |
| 124 */ | 124 */ |
| 125 updateStartupPages_: function(pages) { | 125 updateStartupPages_: function(pages) { |
| 126 var model = new ArrayDataModel(pages); | 126 var model = new ArrayDataModel(pages); |
| 127 // Add a "new page" row. | 127 // Add a "new page" row. |
| 128 model.push({ | 128 model.push({modelIndex: -1}); |
| 129 'modelIndex': '-1' | |
| 130 }); | |
| 131 $('startupPagesList').dataModel = model; | 129 $('startupPagesList').dataModel = model; |
| 132 }, | 130 }, |
| 133 | 131 |
| 134 /** | 132 /** |
| 135 * Sends an asynchronous request for new autocompletion suggestions for the | 133 * Sends an asynchronous request for new autocompletion suggestions for the |
| 136 * the given query. When new suggestions are available, the C++ handler will | 134 * the given query. When new suggestions are available, the C++ handler will |
| 137 * call updateAutocompleteSuggestions_. | 135 * call updateAutocompleteSuggestions_. |
| 138 * @param {string} query List of autocomplete suggestions. | 136 * @param {string} query List of autocomplete suggestions. |
| 139 * @private | 137 * @private |
| 140 */ | 138 */ |
| (...skipping 27 matching lines...) Expand all Loading... |
| 168 var instance = StartupOverlay.getInstance(); | 166 var instance = StartupOverlay.getInstance(); |
| 169 return instance[name + '_'].apply(instance, arguments); | 167 return instance[name + '_'].apply(instance, arguments); |
| 170 }; | 168 }; |
| 171 }); | 169 }); |
| 172 | 170 |
| 173 // Export | 171 // Export |
| 174 return { | 172 return { |
| 175 StartupOverlay: StartupOverlay | 173 StartupOverlay: StartupOverlay |
| 176 }; | 174 }; |
| 177 }); | 175 }); |
| OLD | NEW |