| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 decorate: function() { | 43 decorate: function() { |
| 44 DeletableItem.prototype.decorate.call(this); | 44 DeletableItem.prototype.decorate.call(this); |
| 45 | 45 |
| 46 var profileInfo = this.profileInfo_; | 46 var profileInfo = this.profileInfo_; |
| 47 | 47 |
| 48 var containerEl = this.ownerDocument.createElement('div'); | 48 var containerEl = this.ownerDocument.createElement('div'); |
| 49 containerEl.className = 'profile-container'; | 49 containerEl.className = 'profile-container'; |
| 50 | 50 |
| 51 var iconEl = this.ownerDocument.createElement('img'); | 51 var iconEl = this.ownerDocument.createElement('img'); |
| 52 iconEl.className = 'profile-img'; | 52 iconEl.className = 'profile-img'; |
| 53 iconEl.style.content = cr.icon.getProfileAvatarIcon( | 53 iconEl.style.content = cr.icon.getImage(profileInfo.iconURL); |
| 54 profileInfo.iconURL); | |
| 55 iconEl.alt = ''; | 54 iconEl.alt = ''; |
| 56 containerEl.appendChild(iconEl); | 55 containerEl.appendChild(iconEl); |
| 57 | 56 |
| 58 var nameEl = this.ownerDocument.createElement('div'); | 57 var nameEl = this.ownerDocument.createElement('div'); |
| 59 nameEl.className = 'profile-name'; | 58 nameEl.className = 'profile-name'; |
| 60 if (profileInfo.isCurrentProfile) | 59 if (profileInfo.isCurrentProfile) |
| 61 nameEl.classList.add('profile-item-current'); | 60 nameEl.classList.add('profile-item-current'); |
| 62 containerEl.appendChild(nameEl); | 61 containerEl.appendChild(nameEl); |
| 63 | 62 |
| 64 var displayName = profileInfo.name; | 63 var displayName = profileInfo.name; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 * If false, items in this list will not be deletable. | 132 * If false, items in this list will not be deletable. |
| 134 * @private | 133 * @private |
| 135 */ | 134 */ |
| 136 canDeleteItems_: true, | 135 canDeleteItems_: true, |
| 137 }; | 136 }; |
| 138 | 137 |
| 139 return { | 138 return { |
| 140 ProfileList: ProfileList | 139 ProfileList: ProfileList |
| 141 }; | 140 }; |
| 142 }); | 141 }); |
| OLD | NEW |