| 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 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
| 7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 | 8 |
| 9 const localStrings = new LocalStrings(); | 9 const localStrings = new LocalStrings(); |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 $('startup-overlay-ok').onclick = function() { | 58 $('startup-overlay-ok').onclick = function() { |
| 59 OptionsPage.closeOverlay(); | 59 OptionsPage.closeOverlay(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 // Initialize control enabled states. | 62 // Initialize control enabled states. |
| 63 Preferences.getInstance().addEventListener( | 63 Preferences.getInstance().addEventListener( |
| 64 this.startup_pages_pref_.name, | 64 this.startup_pages_pref_.name, |
| 65 this.handleStartupPageListChange_.bind(this)); | 65 this.handleStartupPageListChange_.bind(this)); |
| 66 | 66 |
| 67 var suggestionList = new options.AutocompleteList(); | 67 var suggestionList = new cr.ui.AutocompleteList(); |
| 68 suggestionList.autoExpands = true; | 68 suggestionList.autoExpands = true; |
| 69 suggestionList.suggestionUpdateRequestCallback = | 69 suggestionList.suggestionUpdateRequestCallback = |
| 70 this.requestAutocompleteSuggestions_.bind(this); | 70 this.requestAutocompleteSuggestions_.bind(this); |
| 71 $('startup-overlay').appendChild(suggestionList); | 71 $('startup-overlay').appendChild(suggestionList); |
| 72 this.autocompleteList_ = suggestionList; | 72 this.autocompleteList_ = suggestionList; |
| 73 startupPagesList.autocompleteList = suggestionList; | 73 startupPagesList.autocompleteList = suggestionList; |
| 74 }, | 74 }, |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * Updates the startup pages list with the given entries. | 77 * Updates the startup pages list with the given entries. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 StartupOverlay[name] = function(value) { | 134 StartupOverlay[name] = function(value) { |
| 135 StartupOverlay.getInstance()[name + '_'](value); | 135 StartupOverlay.getInstance()[name + '_'](value); |
| 136 }; | 136 }; |
| 137 }); | 137 }); |
| 138 | 138 |
| 139 // Export | 139 // Export |
| 140 return { | 140 return { |
| 141 StartupOverlay: StartupOverlay | 141 StartupOverlay: StartupOverlay |
| 142 }; | 142 }; |
| 143 }); | 143 }); |
| OLD | NEW |