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

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

Issue 8400044: Associate the instant label text with a specific checkbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 }, 164 },
165 165
166 /** 166 /**
167 * Called to set the Instant field trial status. 167 * Called to set the Instant field trial status.
168 * @param {boolean} enabled If true, the experiment is enabled. 168 * @param {boolean} enabled If true, the experiment is enabled.
169 * @private 169 * @private
170 */ 170 */
171 setInstantFieldTrialStatus_: function(enabled) { 171 setInstantFieldTrialStatus_: function(enabled) {
172 $('instantEnabledCheckbox').hidden = enabled; 172 $('instantEnabledCheckbox').hidden = enabled;
173 $('instantFieldTrialCheckbox').hidden = !enabled; 173 $('instantFieldTrialCheckbox').hidden = !enabled;
174 $('instantLabel').htmlFor = enabled ? 'instantFieldTrialCheckbox'
175 : 'instantEnabledCheckbox';
174 }, 176 },
175 177
176 /** 178 /**
177 * Called when the value of the homepage-use-NTP pref changes. 179 * Called when the value of the homepage-use-NTP pref changes.
178 * Updates the disabled state of the homepage text field. 180 * Updates the disabled state of the homepage text field.
179 * Notice that the text field can be disabled for other reasons too 181 * Notice that the text field can be disabled for other reasons too
180 * (it can be managed by policy, for instance). 182 * (it can be managed by policy, for instance).
181 * @param {Event} event Change event. 183 * @param {Event} event Change event.
182 * @private 184 * @private
183 */ 185 */
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 BrowserOptions.setInstantFieldTrialStatus = function(enabled) { 356 BrowserOptions.setInstantFieldTrialStatus = function(enabled) {
355 BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled); 357 BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled);
356 }; 358 };
357 359
358 // Export 360 // Export
359 return { 361 return {
360 BrowserOptions: BrowserOptions 362 BrowserOptions: BrowserOptions
361 }; 363 };
362 364
363 }); 365 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698