| Index: chrome/browser/resources/md_user_manager/user_manager.js
|
| diff --git a/chrome/browser/resources/md_user_manager/user_manager.js b/chrome/browser/resources/md_user_manager/user_manager.js
|
| index 6864f2c15aee827e7fb3d549e0cf1d4bd0b9f64e..ed6e7fd2dfc6fc742ef9231df71ab37d78d9b8fb 100644
|
| --- a/chrome/browser/resources/md_user_manager/user_manager.js
|
| +++ b/chrome/browser/resources/md_user_manager/user_manager.js
|
| @@ -40,6 +40,12 @@ cr.define('cr.ui', function() {
|
| newDesktopUserManager: true,
|
|
|
| /**
|
| + * True if all (non-supervised and non-child) profiles are locked.
|
| + * @type {boolean}
|
| + */
|
| + areAllProfilesLocked: false,
|
| +
|
| + /**
|
| * @override
|
| * Overrides clientAreaSize in DisplayManager. When a new profile is created
|
| * the #outer-container page may not be visible yet, so user-pods cannot be
|
| @@ -74,8 +80,13 @@ cr.define('cr.ui', function() {
|
| * displayed.
|
| * @param {boolean} showAddPerson True if 'Add Person' button should be
|
| * displayed.
|
| + * @param {boolean} areAllProfilesLocked True if all profiles are locked.
|
| */
|
| - UserManager.showUserManagerScreen = function(showGuest, showAddPerson) {
|
| + UserManager.showUserManagerScreen = function(showGuest,
|
| + showAddPerson,
|
| + areAllProfilesLocked) {
|
| + UserManager.getInstance().areAllProfilesLocked = areAllProfilesLocked;
|
| +
|
| UserManager.getInstance().showScreen({id: 'account-picker',
|
| data: {disableAddUser: false}});
|
| // Hide control options if the user does not have the right permissions.
|
| @@ -132,6 +143,14 @@ cr.define('cr.ui', function() {
|
| DisplayManager.clearErrors();
|
| };
|
|
|
| + /**
|
| + * Shows the error dialog populated with the given message.
|
| + * @param {string} message Error message to show.
|
| + */
|
| + UserManager.showErrorDialog = function(message) {
|
| + document.querySelector('error-dialog').show(message);
|
| + };
|
| +
|
| // Export
|
| return {
|
| UserManager: UserManager
|
|
|