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 {boolean} visible Whether the audio history section is visible. | |
|
Dan Beam
2014/12/12 22:08:31
nit: I'd arguably make this param first
rpetterson
2014/12/12 22:22:28
Done.
| |
| 1234 * @private | 1235 * @private |
| 1235 */ | 1236 */ |
| 1236 showAudioHistorySection_: function(alwaysOn) { | 1237 setAudioHistorySectionVisible_: function(alwaysOn, visible) { |
| 1237 $('audio-history').hidden = false; | 1238 $('audio-history').hidden = !visible; |
| 1238 $('audio-history-always-on-description').hidden = !alwaysOn; | 1239 $('audio-history-always-on-description').hidden = !alwaysOn; |
| 1239 }, | 1240 }, |
| 1240 | 1241 |
| 1241 /** | 1242 /** |
| 1242 * Event listener for the 'homepage is NTP' preference. Updates the label | 1243 * Event listener for the 'homepage is NTP' preference. Updates the label |
| 1243 * next to the 'Change' button. | 1244 * next to the 'Change' button. |
| 1244 * @param {Event} event The preference change event. | 1245 * @param {Event} event The preference change event. |
| 1245 */ | 1246 */ |
| 1246 onHomePageIsNtpChanged_: function(event) { | 1247 onHomePageIsNtpChanged_: function(event) { |
| 1247 if (!event.value.uncommitted) { | 1248 if (!event.value.uncommitted) { |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2129 'setHighContrastCheckboxState', | 2130 'setHighContrastCheckboxState', |
| 2130 'setHotwordSectionVisible', | 2131 'setHotwordSectionVisible', |
| 2131 'setMetricsReportingCheckboxState', | 2132 'setMetricsReportingCheckboxState', |
| 2132 'setMetricsReportingSettingVisibility', | 2133 'setMetricsReportingSettingVisibility', |
| 2133 'setProfilesInfo', | 2134 'setProfilesInfo', |
| 2134 'setSpokenFeedbackCheckboxState', | 2135 'setSpokenFeedbackCheckboxState', |
| 2135 'setThemesResetButtonEnabled', | 2136 'setThemesResetButtonEnabled', |
| 2136 'setVirtualKeyboardCheckboxState', | 2137 'setVirtualKeyboardCheckboxState', |
| 2137 'setupPageZoomSelector', | 2138 'setupPageZoomSelector', |
| 2138 'setupProxySettingsButton', | 2139 'setupProxySettingsButton', |
| 2139 'showAudioHistorySection', | 2140 'setAudioHistorySectionVisible', |
| 2140 'showBluetoothSettings', | 2141 'showBluetoothSettings', |
| 2141 'showCreateProfileError', | 2142 'showCreateProfileError', |
| 2142 'showCreateProfileSuccess', | 2143 'showCreateProfileSuccess', |
| 2143 'showCreateProfileWarning', | 2144 'showCreateProfileWarning', |
| 2144 'showHotwordAlwaysOnSection', | 2145 'showHotwordAlwaysOnSection', |
| 2145 'showHotwordNoDspSection', | 2146 'showHotwordNoDspSection', |
| 2146 'showHotwordSection', | 2147 'showHotwordSection', |
| 2147 'showMouseControls', | 2148 'showMouseControls', |
| 2148 'showSupervisedUserImportError', | 2149 'showSupervisedUserImportError', |
| 2149 'showSupervisedUserImportSuccess', | 2150 'showSupervisedUserImportSuccess', |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2204 } | 2205 } |
| 2205 button.textContent = loadTimeData.getString(strId); | 2206 button.textContent = loadTimeData.getString(strId); |
| 2206 }; | 2207 }; |
| 2207 } | 2208 } |
| 2208 | 2209 |
| 2209 // Export | 2210 // Export |
| 2210 return { | 2211 return { |
| 2211 BrowserOptions: BrowserOptions | 2212 BrowserOptions: BrowserOptions |
| 2212 }; | 2213 }; |
| 2213 }); | 2214 }); |
| OLD | NEW |