| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 $('defaultBrowserUseAsDefaultButton').onclick = function(event) { | 113 $('defaultBrowserUseAsDefaultButton').onclick = function(event) { |
| 114 chrome.send('becomeDefaultBrowser'); | 114 chrome.send('becomeDefaultBrowser'); |
| 115 }; | 115 }; |
| 116 } | 116 } |
| 117 | 117 |
| 118 var startupPagesList = $('startupPagesList'); | 118 var startupPagesList = $('startupPagesList'); |
| 119 options.browser_options.StartupPageList.decorate(startupPagesList); | 119 options.browser_options.StartupPageList.decorate(startupPagesList); |
| 120 startupPagesList.autoExpands = true; | 120 startupPagesList.autoExpands = true; |
| 121 | 121 |
| 122 // Check if we are in the guest mode. | 122 // Check if we are in the guest mode. |
| 123 if (cr.commandLine.options['--bwsi']) { | 123 if (cr.commandLine && cr.commandLine.options['--bwsi']) { |
| 124 // Hide the startup section. | 124 // Hide the startup section. |
| 125 $('startupSection').hidden = true; | 125 $('startupSection').hidden = true; |
| 126 } else { | 126 } else { |
| 127 // Initialize control enabled states. | 127 // Initialize control enabled states. |
| 128 Preferences.getInstance().addEventListener('session.restore_on_startup', | 128 Preferences.getInstance().addEventListener('session.restore_on_startup', |
| 129 this.updateCustomStartupPageControlStates_.bind(this)); | 129 this.updateCustomStartupPageControlStates_.bind(this)); |
| 130 Preferences.getInstance().addEventListener( | 130 Preferences.getInstance().addEventListener( |
| 131 this.startup_pages_pref_.name, | 131 this.startup_pages_pref_.name, |
| 132 this.handleStartupPageListChange_.bind(this)); | 132 this.handleStartupPageListChange_.bind(this)); |
| 133 | 133 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 BrowserOptions.setInstantFieldTrialStatus = function(enabled) { | 357 BrowserOptions.setInstantFieldTrialStatus = function(enabled) { |
| 358 BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled); | 358 BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled); |
| 359 }; | 359 }; |
| 360 | 360 |
| 361 // Export | 361 // Export |
| 362 return { | 362 return { |
| 363 BrowserOptions: BrowserOptions | 363 BrowserOptions: BrowserOptions |
| 364 }; | 364 }; |
| 365 | 365 |
| 366 }); | 366 }); |
| OLD | NEW |