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 | 9 |
10 // | 10 // |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 !$('manage-profile-overlay-manage').hidden) { | 1043 !$('manage-profile-overlay-manage').hidden) { |
1044 ManageProfileOverlay.showManageDialog(); | 1044 ManageProfileOverlay.showManageDialog(); |
1045 } else { | 1045 } else { |
1046 ManageProfileOverlay.getInstance().visible = false; | 1046 ManageProfileOverlay.getInstance().visible = false; |
1047 } | 1047 } |
1048 | 1048 |
1049 this.setProfileViewButtonsStatus_(); | 1049 this.setProfileViewButtonsStatus_(); |
1050 }, | 1050 }, |
1051 | 1051 |
1052 /** | 1052 /** |
| 1053 * Reports a local error (e.g., disk full) to the "create" overlay during |
| 1054 * profile creation. |
| 1055 * @private |
| 1056 */ |
| 1057 showCreateProfileLocalError_: function() { |
| 1058 CreateProfileOverlay.onLocalError(); |
| 1059 }, |
| 1060 |
| 1061 /** |
| 1062 * Reports successful profile creation to the "create" overlay. |
| 1063 * @param {boolean} isLimited True if the new profile is for a limited user. |
| 1064 * @private |
| 1065 */ |
| 1066 showCreateProfileSuccess_: function(isLimited) { |
| 1067 CreateProfileOverlay.onSuccess(isLimited); |
| 1068 }, |
| 1069 |
| 1070 /** |
1053 * Returns the currently active profile for this browser window. | 1071 * Returns the currently active profile for this browser window. |
1054 * @return {Object} A profile info object. | 1072 * @return {Object} A profile info object. |
1055 * @private | 1073 * @private |
1056 */ | 1074 */ |
1057 getCurrentProfile_: function() { | 1075 getCurrentProfile_: function() { |
1058 for (var i = 0; i < $('profiles-list').dataModel.length; i++) { | 1076 for (var i = 0; i < $('profiles-list').dataModel.length; i++) { |
1059 var profile = $('profiles-list').dataModel.item(i); | 1077 var profile = $('profiles-list').dataModel.item(i); |
1060 if (profile.isCurrentProfile) | 1078 if (profile.isCurrentProfile) |
1061 return profile; | 1079 return profile; |
1062 } | 1080 } |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1422 'setMetricsReportingSettingVisibility', | 1440 'setMetricsReportingSettingVisibility', |
1423 'setPasswordGenerationSettingVisibility', | 1441 'setPasswordGenerationSettingVisibility', |
1424 'setProfilesInfo', | 1442 'setProfilesInfo', |
1425 'setSpokenFeedbackCheckboxState', | 1443 'setSpokenFeedbackCheckboxState', |
1426 'setThemesResetButtonEnabled', | 1444 'setThemesResetButtonEnabled', |
1427 'setVirtualKeyboardCheckboxState', | 1445 'setVirtualKeyboardCheckboxState', |
1428 'setupCloudPrintConnectorSection', | 1446 'setupCloudPrintConnectorSection', |
1429 'setupPageZoomSelector', | 1447 'setupPageZoomSelector', |
1430 'setupProxySettingsSection', | 1448 'setupProxySettingsSection', |
1431 'showBluetoothSettings', | 1449 'showBluetoothSettings', |
| 1450 'showCreateProfileLocalError', |
| 1451 'showCreateProfileSuccess', |
1432 'showMouseControls', | 1452 'showMouseControls', |
1433 'showTouchpadControls', | 1453 'showTouchpadControls', |
1434 'updateAccountPicture', | 1454 'updateAccountPicture', |
1435 'updateAutoLaunchState', | 1455 'updateAutoLaunchState', |
1436 'updateDefaultBrowserState', | 1456 'updateDefaultBrowserState', |
1437 'updateInstantCheckboxState', | 1457 'updateInstantCheckboxState', |
1438 'updateSearchEngines', | 1458 'updateSearchEngines', |
1439 'updateStartupPages', | 1459 'updateStartupPages', |
1440 'updateSyncState', | 1460 'updateSyncState', |
1441 ].forEach(function(name) { | 1461 ].forEach(function(name) { |
(...skipping 12 matching lines...) Expand all Loading... |
1454 BrowserOptions.getLoggedInUsername = function() { | 1474 BrowserOptions.getLoggedInUsername = function() { |
1455 return BrowserOptions.getInstance().username_; | 1475 return BrowserOptions.getInstance().username_; |
1456 }; | 1476 }; |
1457 } | 1477 } |
1458 | 1478 |
1459 // Export | 1479 // Export |
1460 return { | 1480 return { |
1461 BrowserOptions: BrowserOptions | 1481 BrowserOptions: BrowserOptions |
1462 }; | 1482 }; |
1463 }); | 1483 }); |
OLD | NEW |