| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 chrome.send('requestHotwordAvailable'); | 225 chrome.send('requestHotwordAvailable'); |
| 226 | 226 |
| 227 if ($('set-wallpaper')) { | 227 if ($('set-wallpaper')) { |
| 228 $('set-wallpaper').onclick = function(event) { | 228 $('set-wallpaper').onclick = function(event) { |
| 229 chrome.send('openWallpaperManager'); | 229 chrome.send('openWallpaperManager'); |
| 230 chrome.send('coreOptionsUserMetricsAction', | 230 chrome.send('coreOptionsUserMetricsAction', |
| 231 ['Options_OpenWallpaperManager']); | 231 ['Options_OpenWallpaperManager']); |
| 232 }; | 232 }; |
| 233 } | 233 } |
| 234 | 234 |
| 235 // Control the hotword-always-on pref with the Hotword Audio |
| 236 // Verification app. |
| 237 $('hotword-always-on-search-checkbox').customChangeHandler = |
| 238 function(event) { |
| 239 if (!$('hotword-always-on-search-checkbox').checked) |
| 240 return false; |
| 241 |
| 242 $('hotword-always-on-search-checkbox').checked = false; |
| 243 chrome.send('launchHotwordAudioVerificationApp', [false]); |
| 244 return true; |
| 245 }; |
| 246 |
| 235 $('themes-gallery').onclick = function(event) { | 247 $('themes-gallery').onclick = function(event) { |
| 236 window.open(loadTimeData.getString('themesGalleryURL')); | 248 window.open(loadTimeData.getString('themesGalleryURL')); |
| 237 chrome.send('coreOptionsUserMetricsAction', | 249 chrome.send('coreOptionsUserMetricsAction', |
| 238 ['Options_ThemesGallery']); | 250 ['Options_ThemesGallery']); |
| 239 }; | 251 }; |
| 240 $('themes-reset').onclick = function(event) { | 252 $('themes-reset').onclick = function(event) { |
| 241 chrome.send('themesReset'); | 253 chrome.send('themesReset'); |
| 242 }; | 254 }; |
| 243 | 255 |
| 244 if (loadTimeData.getBoolean('profileIsSupervised')) { | 256 if (loadTimeData.getBoolean('profileIsSupervised')) { |
| (...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2046 } | 2058 } |
| 2047 button.textContent = loadTimeData.getString(strId); | 2059 button.textContent = loadTimeData.getString(strId); |
| 2048 }; | 2060 }; |
| 2049 } | 2061 } |
| 2050 | 2062 |
| 2051 // Export | 2063 // Export |
| 2052 return { | 2064 return { |
| 2053 BrowserOptions: BrowserOptions | 2065 BrowserOptions: BrowserOptions |
| 2054 }; | 2066 }; |
| 2055 }); | 2067 }); |
| OLD | NEW |