| 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 ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 var RepeatingButton = cr.ui.RepeatingButton; | 8 var RepeatingButton = cr.ui.RepeatingButton; |
| 9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; | 9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; |
| 10 | 10 |
| (...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 for (var i = 0; i < $('profiles-list').dataModel.length; i++) { | 1281 for (var i = 0; i < $('profiles-list').dataModel.length; i++) { |
| 1282 var profile = $('profiles-list').dataModel.item(i); | 1282 var profile = $('profiles-list').dataModel.item(i); |
| 1283 if (profile.isCurrentProfile) | 1283 if (profile.isCurrentProfile) |
| 1284 return profile; | 1284 return profile; |
| 1285 } | 1285 } |
| 1286 | 1286 |
| 1287 assert(false, | 1287 assert(false, |
| 1288 'There should always be a current profile, but none found.'); | 1288 'There should always be a current profile, but none found.'); |
| 1289 }, | 1289 }, |
| 1290 | 1290 |
| 1291 /** |
| 1292 * Propmpts user to confirm deletion of the profile for this browser |
| 1293 * window. |
| 1294 * @private |
| 1295 */ |
| 1296 deleteCurrentProfile_: function() { |
| 1297 ManageProfileOverlay.showDeleteDialog(this.getCurrentProfile_()); |
| 1298 }, |
| 1299 |
| 1291 setNativeThemeButtonEnabled_: function(enabled) { | 1300 setNativeThemeButtonEnabled_: function(enabled) { |
| 1292 var button = $('themes-native-button'); | 1301 var button = $('themes-native-button'); |
| 1293 if (button) | 1302 if (button) |
| 1294 button.disabled = !enabled; | 1303 button.disabled = !enabled; |
| 1295 }, | 1304 }, |
| 1296 | 1305 |
| 1297 setThemesResetButtonEnabled_: function(enabled) { | 1306 setThemesResetButtonEnabled_: function(enabled) { |
| 1298 $('themes-reset').disabled = !enabled; | 1307 $('themes-reset').disabled = !enabled; |
| 1299 }, | 1308 }, |
| 1300 | 1309 |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1748 * @private | 1757 * @private |
| 1749 */ | 1758 */ |
| 1750 handleSetTime_: function() { | 1759 handleSetTime_: function() { |
| 1751 chrome.send('showSetTime'); | 1760 chrome.send('showSetTime'); |
| 1752 }, | 1761 }, |
| 1753 }; | 1762 }; |
| 1754 | 1763 |
| 1755 //Forward public APIs to private implementations. | 1764 //Forward public APIs to private implementations. |
| 1756 [ | 1765 [ |
| 1757 'addBluetoothDevice', | 1766 'addBluetoothDevice', |
| 1767 'deleteCurrentProfile', |
| 1758 'enableCertificateButton', | 1768 'enableCertificateButton', |
| 1759 'enableFactoryResetSection', | 1769 'enableFactoryResetSection', |
| 1760 'getCurrentProfile', | 1770 'getCurrentProfile', |
| 1761 'getStartStopSyncButton', | 1771 'getStartStopSyncButton', |
| 1762 'hideBluetoothSettings', | 1772 'hideBluetoothSettings', |
| 1763 'notifyInitializationComplete', | 1773 'notifyInitializationComplete', |
| 1764 'removeBluetoothDevice', | 1774 'removeBluetoothDevice', |
| 1765 'scrollToSection', | 1775 'scrollToSection', |
| 1766 'setAccountPictureManaged', | 1776 'setAccountPictureManaged', |
| 1767 'setWallpaperManaged', | 1777 'setWallpaperManaged', |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1815 BrowserOptions.getLoggedInUsername = function() { | 1825 BrowserOptions.getLoggedInUsername = function() { |
| 1816 return BrowserOptions.getInstance().username_; | 1826 return BrowserOptions.getInstance().username_; |
| 1817 }; | 1827 }; |
| 1818 } | 1828 } |
| 1819 | 1829 |
| 1820 // Export | 1830 // Export |
| 1821 return { | 1831 return { |
| 1822 BrowserOptions: BrowserOptions | 1832 BrowserOptions: BrowserOptions |
| 1823 }; | 1833 }; |
| 1824 }); | 1834 }); |
| OLD | NEW |