| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 containerEl.appendChild(iconEl); | 55 containerEl.appendChild(iconEl); |
| 56 | 56 |
| 57 var nameEl = this.ownerDocument.createElement('div'); | 57 var nameEl = this.ownerDocument.createElement('div'); |
| 58 nameEl.className = 'profile-name'; | 58 nameEl.className = 'profile-name'; |
| 59 if (profileInfo.isCurrentProfile) | 59 if (profileInfo.isCurrentProfile) |
| 60 nameEl.classList.add('profile-item-current'); | 60 nameEl.classList.add('profile-item-current'); |
| 61 containerEl.appendChild(nameEl); | 61 containerEl.appendChild(nameEl); |
| 62 | 62 |
| 63 var displayName = profileInfo.name; | 63 var displayName = profileInfo.name; |
| 64 if (profileInfo.isCurrentProfile) { | 64 if (profileInfo.isCurrentProfile) { |
| 65 displayName = loadTimeData.getStringF('profilesListItemCurrent', | 65 displayName = loadTimeData.getStringF( |
| 66 profileInfo.name); | 66 'profilesListItemCurrent', profileInfo.name); |
| 67 } | 67 } |
| 68 nameEl.textContent = displayName; | 68 nameEl.textContent = displayName; |
| 69 | 69 |
| 70 if (profileInfo.isSupervised) { | 70 if (profileInfo.isSupervised) { |
| 71 var supervisedEl = this.ownerDocument.createElement('div'); | 71 var supervisedEl = this.ownerDocument.createElement('div'); |
| 72 supervisedEl.className = 'profile-supervised'; | 72 supervisedEl.className = 'profile-supervised'; |
| 73 supervisedEl.textContent = profileInfo.isChild ? | 73 supervisedEl.textContent = profileInfo.isChild ? |
| 74 loadTimeData.getString('childLabel') : | 74 loadTimeData.getString('childLabel') : |
| 75 loadTimeData.getString('supervisedUserLabel'); | 75 loadTimeData.getString('supervisedUserLabel'); |
| 76 containerEl.appendChild(supervisedEl); | 76 containerEl.appendChild(supervisedEl); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 return this.canDeleteItems_; | 128 return this.canDeleteItems_; |
| 129 }, | 129 }, |
| 130 | 130 |
| 131 /** | 131 /** |
| 132 * If false, items in this list will not be deletable. | 132 * If false, items in this list will not be deletable. |
| 133 * @private | 133 * @private |
| 134 */ | 134 */ |
| 135 canDeleteItems_: true, | 135 canDeleteItems_: true, |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 return { | 138 return {ProfileList: ProfileList}; |
| 139 ProfileList: ProfileList | |
| 140 }; | |
| 141 }); | 139 }); |
| OLD | NEW |