| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 8 |
| 9 // | 9 // |
| 10 // BrowserOptions class | 10 // BrowserOptions class |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 * Updates the startup radio group with the given value. | 269 * Updates the startup radio group with the given value. |
| 270 * @param {number} value the preference value being set. | 270 * @param {number} value the preference value being set. |
| 271 * @private | 271 * @private |
| 272 */ | 272 */ |
| 273 updateRestoreOnStartup_: function(value) { | 273 updateRestoreOnStartup_: function(value) { |
| 274 var items = document.querySelectorAll('input[name=startup]'); | 274 var items = document.querySelectorAll('input[name=startup]'); |
| 275 for (i = 0; i < items.length; i++) { | 275 for (i = 0; i < items.length; i++) { |
| 276 if (items[i].value == value) | 276 if (items[i].value == value) |
| 277 items[i].checked = true; | 277 items[i].checked = true; |
| 278 } | 278 } |
| 279 |
| 280 this.updateCustomStartupPageControlStates_(); |
| 279 }, | 281 }, |
| 280 | 282 |
| 281 /** | 283 /** |
| 282 * Updates the startup pages list with the given entries. | 284 * Updates the startup pages list with the given entries. |
| 283 * @param {Array} pages List of startup pages. | 285 * @param {Array} pages List of startup pages. |
| 284 * @private | 286 * @private |
| 285 */ | 287 */ |
| 286 updateStartupPages_: function(pages) { | 288 updateStartupPages_: function(pages) { |
| 287 var model = new ArrayDataModel(pages); | 289 var model = new ArrayDataModel(pages); |
| 288 // Add a "new page" row. | 290 // Add a "new page" row. |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 BrowserOptions.setInstantFieldTrialStatus = function(enabled) { | 548 BrowserOptions.setInstantFieldTrialStatus = function(enabled) { |
| 547 BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled); | 549 BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled); |
| 548 }; | 550 }; |
| 549 | 551 |
| 550 // Export | 552 // Export |
| 551 return { | 553 return { |
| 552 BrowserOptions: BrowserOptions | 554 BrowserOptions: BrowserOptions |
| 553 }; | 555 }; |
| 554 | 556 |
| 555 }); | 557 }); |
| OLD | NEW |