| OLD | NEW |
| 1 // Copyright (c) 2011 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 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 |
| 11 // Encapsulated handling of browser options page. | 11 // Encapsulated handling of browser options page. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // Initialize control enabled states. | 130 // Initialize control enabled states. |
| 131 Preferences.getInstance().addEventListener('session.restore_on_startup', | 131 Preferences.getInstance().addEventListener('session.restore_on_startup', |
| 132 this.updateCustomStartupPageControlStates_.bind(this)); | 132 this.updateCustomStartupPageControlStates_.bind(this)); |
| 133 Preferences.getInstance().addEventListener( | 133 Preferences.getInstance().addEventListener( |
| 134 this.startup_pages_pref_.name, | 134 this.startup_pages_pref_.name, |
| 135 this.handleStartupPageListChange_.bind(this)); | 135 this.handleStartupPageListChange_.bind(this)); |
| 136 | 136 |
| 137 this.updateCustomStartupPageControlStates_(); | 137 this.updateCustomStartupPageControlStates_(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 var suggestionList = new options.AutocompleteList(); | 140 var suggestionList = new cr.ui.AutocompleteList(); |
| 141 suggestionList.autoExpands = true; | 141 suggestionList.autoExpands = true; |
| 142 suggestionList.suggestionUpdateRequestCallback = | 142 suggestionList.suggestionUpdateRequestCallback = |
| 143 this.requestAutocompleteSuggestions_.bind(this); | 143 this.requestAutocompleteSuggestions_.bind(this); |
| 144 $('main-content').appendChild(suggestionList); | 144 $('main-content').appendChild(suggestionList); |
| 145 this.autocompleteList_ = suggestionList; | 145 this.autocompleteList_ = suggestionList; |
| 146 startupPagesList.autocompleteList = suggestionList; | 146 startupPagesList.autocompleteList = suggestionList; |
| 147 }, | 147 }, |
| 148 | 148 |
| 149 /** | 149 /** |
| 150 * Called when the value of the instant.confirm_dialog_shown preference | 150 * Called when the value of the instant.confirm_dialog_shown preference |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 BrowserOptions.setInstantFieldTrialStatus = function(enabled) { | 379 BrowserOptions.setInstantFieldTrialStatus = function(enabled) { |
| 380 BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled); | 380 BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled); |
| 381 }; | 381 }; |
| 382 | 382 |
| 383 // Export | 383 // Export |
| 384 return { | 384 return { |
| 385 BrowserOptions: BrowserOptions | 385 BrowserOptions: BrowserOptions |
| 386 }; | 386 }; |
| 387 | 387 |
| 388 }); | 388 }); |
| OLD | NEW |