Chromium Code Reviews| OLD | NEW |
|---|---|
| 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.exportPath('options'); | 5 cr.exportPath('options'); |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @typedef {{actionLinkText: (string|undefined), | 8 * @typedef {{actionLinkText: (string|undefined), |
| 9 * childUser: (boolean|undefined), | 9 * childUser: (boolean|undefined), |
| 10 * hasError: (boolean|undefined), | 10 * hasError: (boolean|undefined), |
| (...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1224 * @param {Event} event The preference change event. | 1224 * @param {Event} event The preference change event. |
| 1225 * @private | 1225 * @private |
| 1226 */ | 1226 */ |
| 1227 onHotwordAlwaysOnChanged_: function(event) { | 1227 onHotwordAlwaysOnChanged_: function(event) { |
| 1228 this.setHotwordRetrainLinkVisible_(event.value.value); | 1228 this.setHotwordRetrainLinkVisible_(event.value.value); |
| 1229 }, | 1229 }, |
| 1230 | 1230 |
| 1231 /** | 1231 /** |
| 1232 * Activates the Audio History section of the Settings page. | 1232 * Activates the Audio History section of the Settings page. |
| 1233 * @param {boolean} alwaysOn Whether always-on hotwording is available. | 1233 * @param {boolean} alwaysOn Whether always-on hotwording is available. |
| 1234 * @param {string} stateText Text describing current audio history state. | |
|
Dan Beam
2014/12/11 22:16:53
labelText or sectionLabel (it doesn't matter to th
rpetterson
2014/12/12 19:52:47
Done.
| |
| 1234 * @private | 1235 * @private |
| 1235 */ | 1236 */ |
| 1236 showAudioHistorySection_: function(alwaysOn) { | 1237 showAudioHistorySection_: function(alwaysOn, stateText) { |
| 1237 $('audio-history').hidden = false; | 1238 $('audio-history').hidden = false; |
| 1239 $('audio-history-label').textContent = stateText; | |
| 1238 $('audio-history-always-on-description').hidden = !alwaysOn; | 1240 $('audio-history-always-on-description').hidden = !alwaysOn; |
| 1239 }, | 1241 }, |
| 1240 | 1242 |
| 1241 /** | 1243 /** |
| 1242 * Event listener for the 'homepage is NTP' preference. Updates the label | 1244 * Event listener for the 'homepage is NTP' preference. Updates the label |
| 1243 * next to the 'Change' button. | 1245 * next to the 'Change' button. |
| 1244 * @param {Event} event The preference change event. | 1246 * @param {Event} event The preference change event. |
| 1245 */ | 1247 */ |
| 1246 onHomePageIsNtpChanged_: function(event) { | 1248 onHomePageIsNtpChanged_: function(event) { |
| 1247 if (!event.value.uncommitted) { | 1249 if (!event.value.uncommitted) { |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2204 } | 2206 } |
| 2205 button.textContent = loadTimeData.getString(strId); | 2207 button.textContent = loadTimeData.getString(strId); |
| 2206 }; | 2208 }; |
| 2207 } | 2209 } |
| 2208 | 2210 |
| 2209 // Export | 2211 // Export |
| 2210 return { | 2212 return { |
| 2211 BrowserOptions: BrowserOptions | 2213 BrowserOptions: BrowserOptions |
| 2212 }; | 2214 }; |
| 2213 }); | 2215 }); |
| OLD | NEW |