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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 }; | 121 }; |
122 } | 122 } |
123 | 123 |
124 var startupPagesList = $('startupPagesList'); | 124 var startupPagesList = $('startupPagesList'); |
125 options.browser_options.StartupPageList.decorate(startupPagesList); | 125 options.browser_options.StartupPageList.decorate(startupPagesList); |
126 startupPagesList.autoExpands = true; | 126 startupPagesList.autoExpands = true; |
127 | 127 |
128 // Check if we are in the guest mode. | 128 // Check if we are in the guest mode. |
129 if (cr.commandLine.options['--bwsi']) { | 129 if (cr.commandLine.options['--bwsi']) { |
130 // Hide the startup section. | 130 // Hide the startup section. |
131 $('startupSection').classList.add('hidden'); | 131 $('startupSection').hidden = true; |
132 } else { | 132 } else { |
133 // Initialize control enabled states. | 133 // Initialize control enabled states. |
134 Preferences.getInstance().addEventListener('session.restore_on_startup', | 134 Preferences.getInstance().addEventListener('session.restore_on_startup', |
135 this.updateCustomStartupPageControlStates_.bind(this)); | 135 this.updateCustomStartupPageControlStates_.bind(this)); |
136 Preferences.getInstance().addEventListener( | 136 Preferences.getInstance().addEventListener( |
137 this.startup_pages_pref_.name, | 137 this.startup_pages_pref_.name, |
138 this.handleStartupPageListChange_.bind(this)); | 138 this.handleStartupPageListChange_.bind(this)); |
139 Preferences.getInstance().addEventListener( | 139 Preferences.getInstance().addEventListener( |
140 this.homepage_pref_.name, | 140 this.homepage_pref_.name, |
141 this.handleHomepageChange_.bind(this)); | 141 this.handleHomepageChange_.bind(this)); |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 BrowserOptions.updateAutocompleteSuggestions = function(suggestions) { | 478 BrowserOptions.updateAutocompleteSuggestions = function(suggestions) { |
479 BrowserOptions.getInstance().updateAutocompleteSuggestions_(suggestions); | 479 BrowserOptions.getInstance().updateAutocompleteSuggestions_(suggestions); |
480 }; | 480 }; |
481 | 481 |
482 // Export | 482 // Export |
483 return { | 483 return { |
484 BrowserOptions: BrowserOptions | 484 BrowserOptions: BrowserOptions |
485 }; | 485 }; |
486 | 486 |
487 }); | 487 }); |
OLD | NEW |