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