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

Side by Side Diff: chrome/browser/resources/options/add_startup_page_overlay.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: other cases 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 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 8 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
9 9
10 /** 10 /**
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 /** 105 /**
106 * Sets the value of the input field to the given string. 106 * Sets the value of the input field to the given string.
107 * @private 107 * @private
108 * @param {string} url String value to set the input field to. 108 * @param {string} url String value to set the input field to.
109 */ 109 */
110 setInputFieldValue_: function(url) { 110 setInputFieldValue_: function(url) {
111 $('addStartupPageURL').value = url; 111 $('addStartupPageURL').value = url;
112 this.updateAddButtonState_(); 112 this.updateAddButtonState_();
113 }, 113 },
114
115 /** @inheritDoc */
116 canShowPage: function() {
117 return !$('startupAddButton').disabled;
stuartmorgan 2011/02/12 01:09:06 I'm not wild on using UI state for this. How about
Evan Stade 2011/02/12 03:06:42 There is already such a function, called shouldEna
118 },
114 }; 119 };
115 120
116 AddStartupPageOverlay.updateRecentPageList = function(pages) { 121 AddStartupPageOverlay.updateRecentPageList = function(pages) {
117 AddStartupPageOverlay.getInstance().updateRecentPageList_(pages); 122 AddStartupPageOverlay.getInstance().updateRecentPageList_(pages);
118 }; 123 };
119 124
120 AddStartupPageOverlay.setInputFieldValue = function(url) { 125 AddStartupPageOverlay.setInputFieldValue = function(url) {
121 AddStartupPageOverlay.getInstance().setInputFieldValue_(url); 126 AddStartupPageOverlay.getInstance().setInputFieldValue_(url);
122 }; 127 };
123 128
124 // Export 129 // Export
125 return { 130 return {
126 AddStartupPageOverlay: AddStartupPageOverlay 131 AddStartupPageOverlay: AddStartupPageOverlay
127 }; 132 };
128 133
129 }); 134 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/alert_overlay.js » ('j') | chrome/browser/resources/options/alert_overlay.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698