| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'settings-users-page' is the settings page for managing user accounts on | 7 * 'settings-users-page' is the settings page for managing user accounts on |
| 8 * the device. | 8 * the device. |
| 9 * | 9 * |
| 10 * Example: | 10 * Example: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 properties: { | 21 properties: { |
| 22 /** | 22 /** |
| 23 * Preferences state. | 23 * Preferences state. |
| 24 */ | 24 */ |
| 25 prefs: { | 25 prefs: { |
| 26 type: Object, | 26 type: Object, |
| 27 notify: true, | 27 notify: true, |
| 28 }, | 28 }, |
| 29 | 29 |
| 30 /** @private */ | 30 /** @private */ |
| 31 isOwner_: { | 31 isOwner_: {type: Boolean, value: true}, |
| 32 type: Boolean, | |
| 33 value: true | |
| 34 }, | |
| 35 | 32 |
| 36 /** @private */ | 33 /** @private */ |
| 37 isWhitelistManaged_: { | 34 isWhitelistManaged_: {type: Boolean, value: false}, |
| 38 type: Boolean, | |
| 39 value: false | |
| 40 }, | |
| 41 }, | 35 }, |
| 42 | 36 |
| 43 keyBindings: { | 37 keyBindings: {'enter': 'addUser_'}, |
| 44 'enter': 'addUser_' | |
| 45 }, | |
| 46 | 38 |
| 47 /** @override */ | 39 /** @override */ |
| 48 created: function() { | 40 created: function() { |
| 49 chrome.usersPrivate.isCurrentUserOwner(function(isOwner) { | 41 chrome.usersPrivate.isCurrentUserOwner(function(isOwner) { |
| 50 this.isOwner_ = isOwner; | 42 this.isOwner_ = isOwner; |
| 51 }.bind(this)); | 43 }.bind(this)); |
| 52 | 44 |
| 53 chrome.usersPrivate.isWhitelistManaged(function(isWhitelistManaged) { | 45 chrome.usersPrivate.isWhitelistManaged(function(isWhitelistManaged) { |
| 54 this.isWhitelistManaged_ = isWhitelistManaged; | 46 this.isWhitelistManaged_ = isWhitelistManaged; |
| 55 }.bind(this)); | 47 }.bind(this)); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 78 * @param {boolean} isOwner | 70 * @param {boolean} isOwner |
| 79 * @param {boolean} isWhitelistManaged | 71 * @param {boolean} isWhitelistManaged |
| 80 * @param {boolean} allowGuest | 72 * @param {boolean} allowGuest |
| 81 * @private | 73 * @private |
| 82 * @return {boolean} | 74 * @return {boolean} |
| 83 */ | 75 */ |
| 84 isEditingUsersDisabled_: function(isOwner, isWhitelistManaged, allowGuest) { | 76 isEditingUsersDisabled_: function(isOwner, isWhitelistManaged, allowGuest) { |
| 85 return !isOwner || isWhitelistManaged || allowGuest; | 77 return !isOwner || isWhitelistManaged || allowGuest; |
| 86 } | 78 } |
| 87 }); | 79 }); |
| OLD | NEW |