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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 = getProfileAvatarIcon(profileInfo.iconURL); | 53 iconEl.style.content = getProfileAvatarIcon(profileInfo.iconURL); |
| 54 iconEl.alt = ''; |
54 containerEl.appendChild(iconEl); | 55 containerEl.appendChild(iconEl); |
55 | 56 |
56 var nameEl = this.ownerDocument.createElement('div'); | 57 var nameEl = this.ownerDocument.createElement('div'); |
57 nameEl.className = 'profile-name'; | 58 nameEl.className = 'profile-name'; |
58 if (profileInfo.isCurrentProfile) | 59 if (profileInfo.isCurrentProfile) |
59 nameEl.classList.add('profile-item-current'); | 60 nameEl.classList.add('profile-item-current'); |
60 containerEl.appendChild(nameEl); | 61 containerEl.appendChild(nameEl); |
61 | 62 |
62 var displayName = profileInfo.name; | 63 var displayName = profileInfo.name; |
63 if (profileInfo.isCurrentProfile) { | 64 if (profileInfo.isCurrentProfile) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 * If false, items in this list will not be deletable. | 132 * If false, items in this list will not be deletable. |
132 * @private | 133 * @private |
133 */ | 134 */ |
134 canDeleteItems_: true, | 135 canDeleteItems_: true, |
135 }; | 136 }; |
136 | 137 |
137 return { | 138 return { |
138 ProfileList: ProfileList | 139 ProfileList: ProfileList |
139 }; | 140 }; |
140 }); | 141 }); |
OLD | NEW |