| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 const ArrayDataModel = cr.ui.ArrayDataModel; | 7 const ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 const ListSelectionModel = cr.ui.ListSelectionModel; | 8 const ListSelectionModel = cr.ui.ListSelectionModel; |
| 9 | 9 |
| 10 // | 10 // |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 * Clears the search engine popup. | 126 * Clears the search engine popup. |
| 127 * @private | 127 * @private |
| 128 */ | 128 */ |
| 129 clearSearchEngines_: function() { | 129 clearSearchEngines_: function() { |
| 130 $('defaultSearchEngine').textContent = ''; | 130 $('defaultSearchEngine').textContent = ''; |
| 131 }, | 131 }, |
| 132 | 132 |
| 133 /** | 133 /** |
| 134 * Updates the search engine popup with the given entries. | 134 * Updates the search engine popup with the given entries. |
| 135 * @param {Array} engines List of available search engines. | 135 * @param {Array} engines List of available search engines. |
| 136 * @param {Integer} defaultValue The value of the current default engine. | 136 * @param {number} defaultValue The value of the current default engine. |
| 137 */ | 137 */ |
| 138 updateSearchEngines_: function(engines, defaultValue) { | 138 updateSearchEngines_: function(engines, defaultValue) { |
| 139 this.clearSearchEngines_(); | 139 this.clearSearchEngines_(); |
| 140 engineSelect = $('defaultSearchEngine'); | 140 engineSelect = $('defaultSearchEngine'); |
| 141 engineCount = engines.length; | 141 engineCount = engines.length; |
| 142 var defaultIndex = -1; | 142 var defaultIndex = -1; |
| 143 for (var i = 0; i < engineCount; i++) { | 143 for (var i = 0; i < engineCount; i++) { |
| 144 var engine = engines[i]; | 144 var engine = engines[i]; |
| 145 var option = new Option(engine['name'], engine['index']); | 145 var option = new Option(engine['name'], engine['index']); |
| 146 if (defaultValue == option.value) | 146 if (defaultValue == option.value) |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 BrowserOptions.getInstance().updateStartupPages_(pages); | 377 BrowserOptions.getInstance().updateStartupPages_(pages); |
| 378 StartupPageManager.getInstance().updateStartupPages_(pages); | 378 StartupPageManager.getInstance().updateStartupPages_(pages); |
| 379 }; | 379 }; |
| 380 | 380 |
| 381 // Export | 381 // Export |
| 382 return { | 382 return { |
| 383 BrowserOptions: BrowserOptions | 383 BrowserOptions: BrowserOptions |
| 384 }; | 384 }; |
| 385 | 385 |
| 386 }); | 386 }); |
| OLD | NEW |