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

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

Issue 517413002: Compile chrome://settings, part 1: remove all warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: s/event/Event/ Created 6 years, 3 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
OLDNEW
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 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
7 /** @const */ var SettingsDialog = options.SettingsDialog; 7 /** @const */ var SettingsDialog = options.SettingsDialog;
8 8
9 /** 9 /**
10 * StartupOverlay class 10 * StartupOverlay class
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 * based on the whether the 'pages to restore on startup' pref is enabled. 99 * based on the whether the 'pages to restore on startup' pref is enabled.
100 */ 100 */
101 updateControlStates: function() { 101 updateControlStates: function() {
102 this.setControlsDisabled( 102 this.setControlsDisabled(
103 this.startup_pages_pref_.disabled); 103 this.startup_pages_pref_.disabled);
104 }, 104 },
105 105
106 /** 106 /**
107 * Handles change events of the preference 107 * Handles change events of the preference
108 * 'session.startup_urls'. 108 * 'session.startup_urls'.
109 * @param {event} preference changed event. 109 * @param {Event} event Preference changed event.
110 * @private 110 * @private
111 */ 111 */
112 handleStartupPageListChange_: function(event) { 112 handleStartupPageListChange_: function(event) {
113 this.startup_pages_pref_.disabled = event.value.disabled; 113 this.startup_pages_pref_.disabled = event.value.disabled;
114 this.updateControlStates(); 114 this.updateControlStates();
115 }, 115 },
116 116
117 /** 117 /**
118 * Updates the startup pages list with the given entries. 118 * Updates the startup pages list with the given entries.
119 * @param {Array} pages List of startup pages. 119 * @param {Array} pages List of startup pages.
(...skipping 12 matching lines...) Expand all
132 * call updateAutocompleteSuggestions_. 132 * call updateAutocompleteSuggestions_.
133 * @param {string} query List of autocomplete suggestions. 133 * @param {string} query List of autocomplete suggestions.
134 * @private 134 * @private
135 */ 135 */
136 requestAutocompleteSuggestions_: function(query) { 136 requestAutocompleteSuggestions_: function(query) {
137 chrome.send('requestAutocompleteSuggestionsForStartupPages', [query]); 137 chrome.send('requestAutocompleteSuggestionsForStartupPages', [query]);
138 }, 138 },
139 139
140 /** 140 /**
141 * Updates the autocomplete suggestion list with the given entries. 141 * Updates the autocomplete suggestion list with the given entries.
142 * @param {Array} pages List of autocomplete suggestions. 142 * @param {Array} suggestions List of autocomplete suggestions.
143 * @private 143 * @private
144 */ 144 */
145 updateAutocompleteSuggestions_: function(suggestions) { 145 updateAutocompleteSuggestions_: function(suggestions) {
146 var list = this.autocompleteList_; 146 var list = this.autocompleteList_;
147 // If the trigger for this update was a value being selected from the 147 // If the trigger for this update was a value being selected from the
148 // current list, do nothing. 148 // current list, do nothing.
149 if (list.targetInput && list.selectedItem && 149 if (list.targetInput && list.selectedItem &&
150 list.selectedItem.url == list.targetInput.value) { 150 list.selectedItem.url == list.targetInput.value) {
151 return; 151 return;
152 } 152 }
(...skipping 10 matching lines...) Expand all
163 var instance = StartupOverlay.getInstance(); 163 var instance = StartupOverlay.getInstance();
164 return instance[name + '_'].apply(instance, arguments); 164 return instance[name + '_'].apply(instance, arguments);
165 }; 165 };
166 }); 166 });
167 167
168 // Export 168 // Export
169 return { 169 return {
170 StartupOverlay: StartupOverlay 170 StartupOverlay: StartupOverlay
171 }; 171 };
172 }); 172 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/search_page.js ('k') | chrome/browser/resources/options/website_settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698