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 * hasError: (boolean|undefined), | 9 * hasError: (boolean|undefined), |
| 10 * hasUnrecoverableError: (boolean|undefined), | 10 * hasUnrecoverableError: (boolean|undefined), |
| (...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1189 * @private | 1189 * @private |
| 1190 */ | 1190 */ |
| 1191 showHotwordNoDspSection_: function(opt_error) { | 1191 showHotwordNoDspSection_: function(opt_error) { |
| 1192 this.showHotwordCheckboxAndIndicator_( | 1192 this.showHotwordCheckboxAndIndicator_( |
| 1193 'hotword-no-dsp-search', | 1193 'hotword-no-dsp-search', |
| 1194 'hotword-no-dsp-search-setting-indicator', | 1194 'hotword-no-dsp-search-setting-indicator', |
| 1195 opt_error); | 1195 opt_error); |
| 1196 }, | 1196 }, |
| 1197 | 1197 |
| 1198 /** | 1198 /** |
| 1199 * Hides the hotword sections when it is no longer an option | |
| 1200 * such as when the user selects a non-Google search engine. | |
| 1201 * @private | |
| 1202 */ | |
| 1203 hideHotwordSection_: function() { | |
|
Dan Beam
2014/12/04 20:44:07
nit:
setHotwordSectionVisible: function(visible
rpetterson
2014/12/04 23:20:28
Done.
| |
| 1204 $('hotword-search').hidden = true; | |
| 1205 $('hotword-always-on-search').hidden = true; | |
| 1206 $('hotword-no-dsp-search').hidden = true; | |
| 1207 $('audio-history').hidden = true; | |
| 1208 }, | |
| 1209 | |
| 1210 /** | |
| 1199 * Shows or hides the hotword retrain link | 1211 * Shows or hides the hotword retrain link |
| 1200 * @param {boolean} visible Whether to show the link. | 1212 * @param {boolean} visible Whether to show the link. |
| 1201 * @private | 1213 * @private |
| 1202 */ | 1214 */ |
| 1203 setHotwordRetrainLinkVisible_: function(visible) { | 1215 setHotwordRetrainLinkVisible_: function(visible) { |
| 1204 $('hotword-retrain-link').hidden = !visible; | 1216 $('hotword-retrain-link').hidden = !visible; |
| 1205 }, | 1217 }, |
| 1206 | 1218 |
| 1207 /** | 1219 /** |
| 1208 * Event listener for the 'hotword always on search enabled' preference. | 1220 * Event listener for the 'hotword always on search enabled' preference. |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2091 //Forward public APIs to private implementations. | 2103 //Forward public APIs to private implementations. |
| 2092 cr.makePublic(BrowserOptions, [ | 2104 cr.makePublic(BrowserOptions, [ |
| 2093 'addBluetoothDevice', | 2105 'addBluetoothDevice', |
| 2094 'deleteCurrentProfile', | 2106 'deleteCurrentProfile', |
| 2095 'enableCertificateButton', | 2107 'enableCertificateButton', |
| 2096 'enableDisplayButton', | 2108 'enableDisplayButton', |
| 2097 'enableFactoryResetSection', | 2109 'enableFactoryResetSection', |
| 2098 'getCurrentProfile', | 2110 'getCurrentProfile', |
| 2099 'getStartStopSyncButton', | 2111 'getStartStopSyncButton', |
| 2100 'hideBluetoothSettings', | 2112 'hideBluetoothSettings', |
| 2113 'hideHotwordSection', | |
| 2101 'notifyInitializationComplete', | 2114 'notifyInitializationComplete', |
| 2102 'removeBluetoothDevice', | 2115 'removeBluetoothDevice', |
| 2103 'scrollToSection', | 2116 'scrollToSection', |
| 2104 'setAccountPictureManaged', | 2117 'setAccountPictureManaged', |
| 2105 'setWallpaperManaged', | 2118 'setWallpaperManaged', |
| 2106 'setAutoOpenFileTypesDisplayed', | 2119 'setAutoOpenFileTypesDisplayed', |
| 2107 'setBatteryIcon', | 2120 'setBatteryIcon', |
| 2108 'setBatteryStatusText', | 2121 'setBatteryStatusText', |
| 2109 'setBluetoothState', | 2122 'setBluetoothState', |
| 2110 'setCanSetTime', | 2123 'setCanSetTime', |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2189 } | 2202 } |
| 2190 button.textContent = loadTimeData.getString(strId); | 2203 button.textContent = loadTimeData.getString(strId); |
| 2191 }; | 2204 }; |
| 2192 } | 2205 } |
| 2193 | 2206 |
| 2194 // Export | 2207 // Export |
| 2195 return { | 2208 return { |
| 2196 BrowserOptions: BrowserOptions | 2209 BrowserOptions: BrowserOptions |
| 2197 }; | 2210 }; |
| 2198 }); | 2211 }); |
| OLD | NEW |