OLD | NEW |
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 Loading... |
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 Loading... |
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 }); |
OLD | NEW |