| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 HotwordSearchSettingIndicator.decorate( | 239 HotwordSearchSettingIndicator.decorate( |
| 240 $('hotword-search-setting-indicator')); | 240 $('hotword-search-setting-indicator')); |
| 241 HotwordSearchSettingIndicator.decorate( | 241 HotwordSearchSettingIndicator.decorate( |
| 242 $('hotword-no-dsp-search-setting-indicator')); | 242 $('hotword-no-dsp-search-setting-indicator')); |
| 243 var hotwordIndicator = $('hotword-always-on-search-setting-indicator'); | 243 var hotwordIndicator = $('hotword-always-on-search-setting-indicator'); |
| 244 HotwordSearchSettingIndicator.decorate(hotwordIndicator); | 244 HotwordSearchSettingIndicator.decorate(hotwordIndicator); |
| 245 hotwordIndicator.disabledOnErrorSection = | 245 hotwordIndicator.disabledOnErrorSection = |
| 246 $('hotword-always-on-search-checkbox'); | 246 $('hotword-always-on-search-checkbox'); |
| 247 chrome.send('requestHotwordAvailable'); | 247 chrome.send('requestHotwordAvailable'); |
| 248 | 248 |
| 249 chrome.send('requestGoogleNowAvailable'); |
| 250 |
| 249 if ($('set-wallpaper')) { | 251 if ($('set-wallpaper')) { |
| 250 $('set-wallpaper').onclick = function(event) { | 252 $('set-wallpaper').onclick = function(event) { |
| 251 chrome.send('openWallpaperManager'); | 253 chrome.send('openWallpaperManager'); |
| 252 chrome.send('coreOptionsUserMetricsAction', | 254 chrome.send('coreOptionsUserMetricsAction', |
| 253 ['Options_OpenWallpaperManager']); | 255 ['Options_OpenWallpaperManager']); |
| 254 }; | 256 }; |
| 255 } | 257 } |
| 256 | 258 |
| 257 // Control the hotword-always-on pref with the Hotword Audio | 259 // Control the hotword-always-on pref with the Hotword Audio |
| 258 // Verification app. | 260 // Verification app. |
| (...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 * Event listener for the 'hotword always on search enabled' preference. | 1249 * Event listener for the 'hotword always on search enabled' preference. |
| 1248 * Updates the visibility of the 'retrain' link. | 1250 * Updates the visibility of the 'retrain' link. |
| 1249 * @param {Event} event The preference change event. | 1251 * @param {Event} event The preference change event. |
| 1250 * @private | 1252 * @private |
| 1251 */ | 1253 */ |
| 1252 onHotwordAlwaysOnChanged_: function(event) { | 1254 onHotwordAlwaysOnChanged_: function(event) { |
| 1253 this.setHotwordRetrainLinkVisible_(event.value.value); | 1255 this.setHotwordRetrainLinkVisible_(event.value.value); |
| 1254 }, | 1256 }, |
| 1255 | 1257 |
| 1256 /** | 1258 /** |
| 1259 * Controls the visibility of the Now settings. |
| 1260 * @param {boolean} visible Whether to show Now settings. |
| 1261 * @private |
| 1262 */ |
| 1263 setNowSectionVisible_: function(visible) { |
| 1264 $('google-now-launcher').hidden = !visible; |
| 1265 }, |
| 1266 |
| 1267 /** |
| 1257 * Activates the Audio History section of the Settings page. | 1268 * Activates the Audio History section of the Settings page. |
| 1258 * @param {boolean} visible Whether the audio history section is visible. | 1269 * @param {boolean} visible Whether the audio history section is visible. |
| 1259 * @param {string} labelText Text describing current audio history state. | 1270 * @param {string} labelText Text describing current audio history state. |
| 1260 * @private | 1271 * @private |
| 1261 */ | 1272 */ |
| 1262 setAudioHistorySectionVisible_: function(visible, labelText) { | 1273 setAudioHistorySectionVisible_: function(visible, labelText) { |
| 1263 $('audio-history').hidden = !visible; | 1274 $('audio-history').hidden = !visible; |
| 1264 $('audio-history-label').textContent = labelText; | 1275 $('audio-history-label').textContent = labelText; |
| 1265 }, | 1276 }, |
| 1266 | 1277 |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2166 'setWallpaperManaged', | 2177 'setWallpaperManaged', |
| 2167 'setAutoOpenFileTypesDisplayed', | 2178 'setAutoOpenFileTypesDisplayed', |
| 2168 'setBatteryIcon', | 2179 'setBatteryIcon', |
| 2169 'setBatteryStatusText', | 2180 'setBatteryStatusText', |
| 2170 'setBluetoothState', | 2181 'setBluetoothState', |
| 2171 'setCanSetTime', | 2182 'setCanSetTime', |
| 2172 'setFontSize', | 2183 'setFontSize', |
| 2173 'setHotwordRetrainLinkVisible', | 2184 'setHotwordRetrainLinkVisible', |
| 2174 'setNativeThemeButtonEnabled', | 2185 'setNativeThemeButtonEnabled', |
| 2175 'setNetworkPredictionValue', | 2186 'setNetworkPredictionValue', |
| 2187 'setNowSectionVisible', |
| 2176 'setHighContrastCheckboxState', | 2188 'setHighContrastCheckboxState', |
| 2177 'setAllHotwordSectionsVisible', | 2189 'setAllHotwordSectionsVisible', |
| 2178 'setMetricsReportingCheckboxState', | 2190 'setMetricsReportingCheckboxState', |
| 2179 'setMetricsReportingSettingVisibility', | 2191 'setMetricsReportingSettingVisibility', |
| 2180 'setProfilesInfo', | 2192 'setProfilesInfo', |
| 2181 'setSpokenFeedbackCheckboxState', | 2193 'setSpokenFeedbackCheckboxState', |
| 2182 'setThemesResetButtonEnabled', | 2194 'setThemesResetButtonEnabled', |
| 2183 'setVirtualKeyboardCheckboxState', | 2195 'setVirtualKeyboardCheckboxState', |
| 2184 'setupPageZoomSelector', | 2196 'setupPageZoomSelector', |
| 2185 'setupProxySettingsButton', | 2197 'setupProxySettingsButton', |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2251 } | 2263 } |
| 2252 button.textContent = loadTimeData.getString(strId); | 2264 button.textContent = loadTimeData.getString(strId); |
| 2253 }; | 2265 }; |
| 2254 } | 2266 } |
| 2255 | 2267 |
| 2256 // Export | 2268 // Export |
| 2257 return { | 2269 return { |
| 2258 BrowserOptions: BrowserOptions | 2270 BrowserOptions: BrowserOptions |
| 2259 }; | 2271 }; |
| 2260 }); | 2272 }); |
| OLD | NEW |