| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 * @param {Event} event Preference changed event. | 109 * @param {Event} event Preference changed event. |
| 110 * @private | 110 * @private |
| 111 */ | 111 */ |
| 112 handleStartupPageListChange_: function(event) { | 112 handleStartupPageListChange_: function(event) { |
| 113 this.startup_pages_pref_.disabled = event.value.disabled; | 113 this.startup_pages_pref_.disabled = event.value.disabled; |
| 114 this.updateControlStates(); | 114 this.updateControlStates(); |
| 115 }, | 115 }, |
| 116 | 116 |
| 117 /** | 117 /** |
| 118 * Updates the startup pages list with the given entries. | 118 * Updates the startup pages list with the given entries. |
| 119 * @param {Array} pages List of startup pages. | 119 * @param {!Array} pages List of startup pages. |
| 120 * @private | 120 * @private |
| 121 */ | 121 */ |
| 122 updateStartupPages_: function(pages) { | 122 updateStartupPages_: function(pages) { |
| 123 var model = new ArrayDataModel(pages); | 123 var model = new ArrayDataModel(pages); |
| 124 // Add a "new page" row. | 124 // Add a "new page" row. |
| 125 model.push({modelIndex: -1}); | 125 model.push({modelIndex: -1}); |
| 126 $('startupPagesList').dataModel = model; | 126 $('startupPagesList').dataModel = model; |
| 127 }, | 127 }, |
| 128 | 128 |
| 129 /** | 129 /** |
| (...skipping 28 matching lines...) Expand all Loading... |
| 158 cr.makePublic(StartupOverlay, [ | 158 cr.makePublic(StartupOverlay, [ |
| 159 'updateStartupPages', | 159 'updateStartupPages', |
| 160 'updateAutocompleteSuggestions', | 160 'updateAutocompleteSuggestions', |
| 161 ]); | 161 ]); |
| 162 | 162 |
| 163 // Export | 163 // Export |
| 164 return { | 164 return { |
| 165 StartupOverlay: StartupOverlay | 165 StartupOverlay: StartupOverlay |
| 166 }; | 166 }; |
| 167 }); | 167 }); |
| OLD | NEW |