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

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

Issue 6480039: chrome://settings - Provide method for pages to prevent themselves being shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment update Created 9 years, 10 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) 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 defaultIndex = i; 153 defaultIndex = i;
154 engineSelect.appendChild(option); 154 engineSelect.appendChild(option);
155 } 155 }
156 if (defaultIndex >= 0) 156 if (defaultIndex >= 0)
157 engineSelect.selectedIndex = defaultIndex; 157 engineSelect.selectedIndex = defaultIndex;
158 }, 158 },
159 159
160 /** 160 /**
161 * Returns true if the custom startup page control block should 161 * Returns true if the custom startup page control block should
162 * be enabled. 162 * be enabled.
163 * @private
164 * @returns {boolean} Whether the startup page controls should be 163 * @returns {boolean} Whether the startup page controls should be
165 * enabled. 164 * enabled.
166 */ 165 */
167 shouldEnableCustomStartupPageControls_: function(pages) { 166 shouldEnableCustomStartupPageControls: function(pages) {
168 return $('startupShowPagesButton').checked; 167 return $('startupShowPagesButton').checked;
169 }, 168 },
170 169
171 /** 170 /**
172 * Updates the startup pages list with the given entries. 171 * Updates the startup pages list with the given entries.
173 * @private 172 * @private
174 * @param {Array} pages List of startup pages. 173 * @param {Array} pages List of startup pages.
175 */ 174 */
176 updateStartupPages_: function(pages) { 175 updateStartupPages_: function(pages) {
177 $('startupPagesList').dataModel = new ArrayDataModel(pages); 176 $('startupPagesList').dataModel = new ArrayDataModel(pages);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 !(this.isHomepageURLNewTabPageURL_() && 328 !(this.isHomepageURLNewTabPageURL_() &&
330 !this.homepage_is_newtabpage_pref_.managed)); 329 !this.homepage_is_newtabpage_pref_.managed));
331 }, 330 },
332 331
333 /** 332 /**
334 * Sets the enabled state of the custom startup page list controls 333 * Sets the enabled state of the custom startup page list controls
335 * based on the current startup radio button selection. 334 * based on the current startup radio button selection.
336 * @private 335 * @private
337 */ 336 */
338 updateCustomStartupPageControlStates_: function() { 337 updateCustomStartupPageControlStates_: function() {
339 var disable = !this.shouldEnableCustomStartupPageControls_(); 338 var disable = !this.shouldEnableCustomStartupPageControls();
340 $('startupPagesList').disabled = disable; 339 $('startupPagesList').disabled = disable;
341 $('startupUseCurrentButton').disabled = disable; 340 $('startupUseCurrentButton').disabled = disable;
342 $('startupAddButton').disabled = disable; 341 $('startupAddButton').disabled = disable;
343 }, 342 },
344 343
345 /** 344 /**
346 * Set the default search engine based on the popup selection. 345 * Set the default search engine based on the popup selection.
347 */ 346 */
348 setDefaultSearchEngine: function() { 347 setDefaultSearchEngine: function() {
349 var engineSelect = $('defaultSearchEngine'); 348 var engineSelect = $('defaultSearchEngine');
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 BrowserOptions.addStartupPage = function(url) { 384 BrowserOptions.addStartupPage = function(url) {
386 BrowserOptions.getInstance().addStartupPage_(url); 385 BrowserOptions.getInstance().addStartupPage_(url);
387 }; 386 };
388 387
389 // Export 388 // Export
390 return { 389 return {
391 BrowserOptions: BrowserOptions 390 BrowserOptions: BrowserOptions
392 }; 391 };
393 392
394 }); 393 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698