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.define('options', function() { | 5 cr.define('options', function() { |
6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 var Page = cr.ui.pageManager.Page; | 7 var Page = cr.ui.pageManager.Page; |
8 var PageManager = cr.ui.pageManager.PageManager; | 8 var PageManager = cr.ui.pageManager.PageManager; |
9 var ArrayDataModel = cr.ui.ArrayDataModel; | 9 var ArrayDataModel = cr.ui.ArrayDataModel; |
10 var RepeatingButton = cr.ui.RepeatingButton; | 10 var RepeatingButton = cr.ui.RepeatingButton; |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 chrome.send('requestHotwordAvailable'); | 205 chrome.send('requestHotwordAvailable'); |
206 | 206 |
207 if ($('set-wallpaper')) { | 207 if ($('set-wallpaper')) { |
208 $('set-wallpaper').onclick = function(event) { | 208 $('set-wallpaper').onclick = function(event) { |
209 chrome.send('openWallpaperManager'); | 209 chrome.send('openWallpaperManager'); |
210 chrome.send('coreOptionsUserMetricsAction', | 210 chrome.send('coreOptionsUserMetricsAction', |
211 ['Options_OpenWallpaperManager']); | 211 ['Options_OpenWallpaperManager']); |
212 }; | 212 }; |
213 } | 213 } |
214 | 214 |
| 215 // Control the hotword-always-on pref with the Hotword Audio |
| 216 // Verification app. |
| 217 $('hotword-always-on-search-checkbox').customChangeHandler = |
| 218 function(event) { |
| 219 if (!$('hotword-always-on-search-checkbox').checked) |
| 220 return false; |
| 221 |
| 222 $('hotword-always-on-search-checkbox').checked = false; |
| 223 chrome.send('launchHotwordAudioVerificationApp', [false]); |
| 224 return true; |
| 225 }; |
| 226 |
215 $('themes-gallery').onclick = function(event) { | 227 $('themes-gallery').onclick = function(event) { |
216 window.open(loadTimeData.getString('themesGalleryURL')); | 228 window.open(loadTimeData.getString('themesGalleryURL')); |
217 chrome.send('coreOptionsUserMetricsAction', | 229 chrome.send('coreOptionsUserMetricsAction', |
218 ['Options_ThemesGallery']); | 230 ['Options_ThemesGallery']); |
219 }; | 231 }; |
220 $('themes-reset').onclick = function(event) { | 232 $('themes-reset').onclick = function(event) { |
221 chrome.send('themesReset'); | 233 chrome.send('themesReset'); |
222 }; | 234 }; |
223 | 235 |
224 if (loadTimeData.getBoolean('profileIsSupervised')) { | 236 if (loadTimeData.getBoolean('profileIsSupervised')) { |
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1994 } | 2006 } |
1995 button.textContent = loadTimeData.getString(strId); | 2007 button.textContent = loadTimeData.getString(strId); |
1996 }; | 2008 }; |
1997 } | 2009 } |
1998 | 2010 |
1999 // Export | 2011 // Export |
2000 return { | 2012 return { |
2001 BrowserOptions: BrowserOptions | 2013 BrowserOptions: BrowserOptions |
2002 }; | 2014 }; |
2003 }); | 2015 }); |
OLD | NEW |