| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.managedUserOptions', function() { | 5 cr.define('options.managedUserOptions', function() { |
| 6 /** @const */ var List = cr.ui.List; | 6 /** @const */ var List = cr.ui.List; |
| 7 /** @const */ var ListItem = cr.ui.ListItem; | 7 /** @const */ var ListItem = cr.ui.ListItem; |
| 8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; | 8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 }, | 55 }, |
| 56 | 56 |
| 57 /** @override */ | 57 /** @override */ |
| 58 decorate: function() { | 58 decorate: function() { |
| 59 ListItem.prototype.decorate.call(this); | 59 ListItem.prototype.decorate.call(this); |
| 60 var managedUser = this.managedUser_; | 60 var managedUser = this.managedUser_; |
| 61 | 61 |
| 62 // Add the avatar. | 62 // Add the avatar. |
| 63 var iconElement = this.ownerDocument.createElement('img'); | 63 var iconElement = this.ownerDocument.createElement('img'); |
| 64 iconElement.className = 'profile-img'; | 64 iconElement.className = 'profile-img'; |
| 65 iconElement.style.content = | 65 iconElement.style.content = getProfileAvatarIcon(managedUser.iconURL); |
| 66 imageset(managedUser.iconURL + '@scalefactorx'); | |
| 67 this.appendChild(iconElement); | 66 this.appendChild(iconElement); |
| 68 | 67 |
| 69 // Add the profile name. | 68 // Add the profile name. |
| 70 var nameElement = this.ownerDocument.createElement('div'); | 69 var nameElement = this.ownerDocument.createElement('div'); |
| 71 nameElement.className = 'profile-name'; | 70 nameElement.className = 'profile-name'; |
| 72 nameElement.textContent = managedUser.name; | 71 nameElement.textContent = managedUser.name; |
| 73 this.appendChild(nameElement); | 72 this.appendChild(nameElement); |
| 74 | 73 |
| 75 if (managedUser.onCurrentDevice) { | 74 if (managedUser.onCurrentDevice) { |
| 76 iconElement.className += ' profile-img-disabled'; | 75 iconElement.className += ' profile-img-disabled'; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 this.selectionModel = new ListSingleSelectionModel(); | 107 this.selectionModel = new ListSingleSelectionModel(); |
| 109 this.autoExpands = true; | 108 this.autoExpands = true; |
| 110 }, | 109 }, |
| 111 }; | 110 }; |
| 112 | 111 |
| 113 return { | 112 return { |
| 114 ManagedUserListItem: ManagedUserListItem, | 113 ManagedUserListItem: ManagedUserListItem, |
| 115 ManagedUserList: ManagedUserList, | 114 ManagedUserList: ManagedUserList, |
| 116 }; | 115 }; |
| 117 }); | 116 }); |
| OLD | NEW |