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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 $('themes-reset').textContent = loadTimeData.getString('themesReset'); | 293 $('themes-reset').textContent = loadTimeData.getString('themesReset'); |
294 } | 294 } |
295 | 295 |
296 // Device section (ChromeOS only). | 296 // Device section (ChromeOS only). |
297 if (cr.isChromeOS) { | 297 if (cr.isChromeOS) { |
298 $('power-settings-button').onclick = function(evt) { | 298 $('power-settings-button').onclick = function(evt) { |
299 PageManager.showPageByName('power-overlay'); | 299 PageManager.showPageByName('power-overlay'); |
300 chrome.send('coreOptionsUserMetricsAction', | 300 chrome.send('coreOptionsUserMetricsAction', |
301 ['Options_ShowPowerSettings']); | 301 ['Options_ShowPowerSettings']); |
302 }; | 302 }; |
303 $('battery-button').onclick = function(evt) { | |
304 WebsiteSettingsManager.showWebsiteSettings('battery'); | |
305 }; | |
306 $('stored-data-button').onclick = function(evt) { | |
307 WebsiteSettingsManager.showWebsiteSettings('storage'); | |
308 }; | |
309 $('keyboard-settings-button').onclick = function(evt) { | 303 $('keyboard-settings-button').onclick = function(evt) { |
310 PageManager.showPageByName('keyboard-overlay'); | 304 PageManager.showPageByName('keyboard-overlay'); |
311 chrome.send('coreOptionsUserMetricsAction', | 305 chrome.send('coreOptionsUserMetricsAction', |
312 ['Options_ShowKeyboardSettings']); | 306 ['Options_ShowKeyboardSettings']); |
313 }; | 307 }; |
314 $('pointer-settings-button').onclick = function(evt) { | 308 $('pointer-settings-button').onclick = function(evt) { |
315 PageManager.showPageByName('pointer-overlay'); | 309 PageManager.showPageByName('pointer-overlay'); |
316 chrome.send('coreOptionsUserMetricsAction', | 310 chrome.send('coreOptionsUserMetricsAction', |
317 ['Options_ShowTouchpadSettings']); | 311 ['Options_ShowTouchpadSettings']); |
318 }; | 312 }; |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 $('easy-unlock-setup-button').onclick = function(event) { | 579 $('easy-unlock-setup-button').onclick = function(event) { |
586 chrome.send('launchEasyUnlockSetup'); | 580 chrome.send('launchEasyUnlockSetup'); |
587 }; | 581 }; |
588 $('easy-unlock-turn-off-button').onclick = function(event) { | 582 $('easy-unlock-turn-off-button').onclick = function(event) { |
589 PageManager.showPageByName('easyUnlockTurnOffOverlay'); | 583 PageManager.showPageByName('easyUnlockTurnOffOverlay'); |
590 }; | 584 }; |
591 } | 585 } |
592 $('easy-unlock-enable-proximity-detection').hidden = | 586 $('easy-unlock-enable-proximity-detection').hidden = |
593 !loadTimeData.getBoolean('easyUnlockProximityDetectionAllowed'); | 587 !loadTimeData.getBoolean('easyUnlockProximityDetectionAllowed'); |
594 | 588 |
595 // Website Settings section. | |
596 if (loadTimeData.getBoolean('websiteSettingsManagerEnabled')) { | |
597 $('website-settings-section').hidden = false; | |
598 $('website-management-button').onclick = function(event) { | |
599 PageManager.showPageByName('websiteSettings'); | |
600 }; | |
601 } | |
602 | |
603 // Web Content section. | 589 // Web Content section. |
604 $('fontSettingsCustomizeFontsButton').onclick = function(event) { | 590 $('fontSettingsCustomizeFontsButton').onclick = function(event) { |
605 PageManager.showPageByName('fonts'); | 591 PageManager.showPageByName('fonts'); |
606 chrome.send('coreOptionsUserMetricsAction', | 592 chrome.send('coreOptionsUserMetricsAction', |
607 ['Options_ShowFontSettings']); | 593 ['Options_ShowFontSettings']); |
608 }; | 594 }; |
609 $('defaultFontSize').onchange = function(event) { | 595 $('defaultFontSize').onchange = function(event) { |
610 var value = event.target.options[event.target.selectedIndex].value; | 596 var value = event.target.options[event.target.selectedIndex].value; |
611 Preferences.setIntegerPref( | 597 Preferences.setIntegerPref( |
612 'webkit.webprefs.default_fixed_font_size', | 598 'webkit.webprefs.default_fixed_font_size', |
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2269 } | 2255 } |
2270 button.textContent = loadTimeData.getString(strId); | 2256 button.textContent = loadTimeData.getString(strId); |
2271 }; | 2257 }; |
2272 } | 2258 } |
2273 | 2259 |
2274 // Export | 2260 // Export |
2275 return { | 2261 return { |
2276 BrowserOptions: BrowserOptions | 2262 BrowserOptions: BrowserOptions |
2277 }; | 2263 }; |
2278 }); | 2264 }); |
OLD | NEW |