| 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 16 matching lines...) Expand all Loading... |
| 27 __proto__: SettingsDialog.prototype, | 27 __proto__: SettingsDialog.prototype, |
| 28 | 28 |
| 29 /** | 29 /** |
| 30 * An autocomplete list that can be attached to a text field during editing. | 30 * An autocomplete list that can be attached to a text field during editing. |
| 31 * @type {HTMLElement} | 31 * @type {HTMLElement} |
| 32 * @private | 32 * @private |
| 33 */ | 33 */ |
| 34 autocompleteList_: null, | 34 autocompleteList_: null, |
| 35 | 35 |
| 36 startup_pages_pref_: { | 36 startup_pages_pref_: { |
| 37 'name': 'session.urls_to_restore_on_startup', | 37 'name': 'session.startup_urls', |
| 38 'disabled': false | 38 'disabled': false |
| 39 }, | 39 }, |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * Initialize the page. | 42 * Initialize the page. |
| 43 */ | 43 */ |
| 44 initializePage: function() { | 44 initializePage: function() { |
| 45 SettingsDialog.prototype.initializePage.call(this); | 45 SettingsDialog.prototype.initializePage.call(this); |
| 46 | 46 |
| 47 var self = this; | 47 var self = this; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 * Enables or disables the the custom startup page list controls | 101 * Enables or disables the the custom startup page list controls |
| 102 * based on the whether the 'pages to restore on startup' pref is enabled. | 102 * based on the whether the 'pages to restore on startup' pref is enabled. |
| 103 */ | 103 */ |
| 104 updateControlStates: function() { | 104 updateControlStates: function() { |
| 105 this.setControlsDisabled( | 105 this.setControlsDisabled( |
| 106 this.startup_pages_pref_.disabled); | 106 this.startup_pages_pref_.disabled); |
| 107 }, | 107 }, |
| 108 | 108 |
| 109 /** | 109 /** |
| 110 * Handles change events of the preference | 110 * Handles change events of the preference |
| 111 * 'session.urls_to_restore_on_startup'. | 111 * 'session.startup_urls'. |
| 112 * @param {event} preference changed event. | 112 * @param {event} preference changed event. |
| 113 * @private | 113 * @private |
| 114 */ | 114 */ |
| 115 handleStartupPageListChange_: function(event) { | 115 handleStartupPageListChange_: function(event) { |
| 116 this.startup_pages_pref_.disabled = event.value.disabled; | 116 this.startup_pages_pref_.disabled = event.value.disabled; |
| 117 this.updateControlStates(); | 117 this.updateControlStates(); |
| 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. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 var instance = StartupOverlay.getInstance(); | 166 var instance = StartupOverlay.getInstance(); |
| 167 return instance[name + '_'].apply(instance, arguments); | 167 return instance[name + '_'].apply(instance, arguments); |
| 168 }; | 168 }; |
| 169 }); | 169 }); |
| 170 | 170 |
| 171 // Export | 171 // Export |
| 172 return { | 172 return { |
| 173 StartupOverlay: StartupOverlay | 173 StartupOverlay: StartupOverlay |
| 174 }; | 174 }; |
| 175 }); | 175 }); |
| OLD | NEW |