| 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.browser_options', function() { | 5 cr.define('options.browser_options', function() { |
| 6 /** @const */ var DeletableItem = options.DeletableItem; | 6 /** @const */ var DeletableItem = options.DeletableItem; |
| 7 /** @const */ var DeletableItemList = options.DeletableItemList; | 7 /** @const */ var DeletableItemList = options.DeletableItemList; |
| 8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; | 8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 }, | 47 }, |
| 48 | 48 |
| 49 /** @override */ | 49 /** @override */ |
| 50 decorate: function() { | 50 decorate: function() { |
| 51 DeletableItem.prototype.decorate.call(this); | 51 DeletableItem.prototype.decorate.call(this); |
| 52 | 52 |
| 53 var profileInfo = this.profileInfo_; | 53 var profileInfo = this.profileInfo_; |
| 54 | 54 |
| 55 var iconEl = this.ownerDocument.createElement('img'); | 55 var iconEl = this.ownerDocument.createElement('img'); |
| 56 iconEl.className = 'profile-img'; | 56 iconEl.className = 'profile-img'; |
| 57 iconEl.style.content = imageset(profileInfo.iconURL + '@scalefactorx'); | 57 iconEl.style.content = getProfileAvatarIcon(profileInfo.iconURL); |
| 58 this.contentElement.appendChild(iconEl); | 58 this.contentElement.appendChild(iconEl); |
| 59 | 59 |
| 60 var nameEl = this.ownerDocument.createElement('div'); | 60 var nameEl = this.ownerDocument.createElement('div'); |
| 61 nameEl.className = 'profile-name'; | 61 nameEl.className = 'profile-name'; |
| 62 if (profileInfo.isCurrentProfile) | 62 if (profileInfo.isCurrentProfile) |
| 63 nameEl.classList.add('profile-item-current'); | 63 nameEl.classList.add('profile-item-current'); |
| 64 this.contentElement.appendChild(nameEl); | 64 this.contentElement.appendChild(nameEl); |
| 65 | 65 |
| 66 var displayName = profileInfo.name; | 66 var displayName = profileInfo.name; |
| 67 if (profileInfo.isCurrentProfile) { | 67 if (profileInfo.isCurrentProfile) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 * If false, items in this list will not be deltable. | 119 * If false, items in this list will not be deltable. |
| 120 * @private | 120 * @private |
| 121 */ | 121 */ |
| 122 canDeleteItems_: true, | 122 canDeleteItems_: true, |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 return { | 125 return { |
| 126 ProfileList: ProfileList | 126 ProfileList: ProfileList |
| 127 }; | 127 }; |
| 128 }); | 128 }); |
| 129 | |
| OLD | NEW |