Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(745)

Side by Side Diff: chrome/browser/resources/options/browser_options.js

Issue 9168026: Move autocomplete_list.js from options and options2 to shared/js (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright year 2012 Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698