| 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.accounts', function() { | 5 cr.define('options.accounts', function() { |
| 6 /** @const */ var List = cr.ui.List; | 6 /** @const */ var List = cr.ui.List; |
| 7 /** @const */ var ListItem = cr.ui.ListItem; | 7 /** @const */ var ListItem = cr.ui.ListItem; |
| 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 this.icon_.className = 'user-icon'; | 137 this.icon_.className = 'user-icon'; |
| 138 this.updatePicture(); | 138 this.updatePicture(); |
| 139 | 139 |
| 140 var labelEmail = this.ownerDocument.createElement('span'); | 140 var labelEmail = this.ownerDocument.createElement('span'); |
| 141 labelEmail.className = 'user-email-label'; | 141 labelEmail.className = 'user-email-label'; |
| 142 labelEmail.textContent = this.user.email; | 142 labelEmail.textContent = this.user.email; |
| 143 | 143 |
| 144 var labelName = this.ownerDocument.createElement('span'); | 144 var labelName = this.ownerDocument.createElement('span'); |
| 145 labelName.className = 'user-name-label'; | 145 labelName.className = 'user-name-label'; |
| 146 labelName.textContent = this.user.owner ? | 146 labelName.textContent = this.user.owner ? |
| 147 localStrings.getStringF('username_format', this.user.name) : | 147 loadTimeData.getStringF('username_format', this.user.name) : |
| 148 this.user.name; | 148 this.user.name; |
| 149 | 149 |
| 150 var emailNameBlock = this.ownerDocument.createElement('div'); | 150 var emailNameBlock = this.ownerDocument.createElement('div'); |
| 151 emailNameBlock.className = 'user-email-name-block'; | 151 emailNameBlock.className = 'user-email-name-block'; |
| 152 emailNameBlock.appendChild(labelEmail); | 152 emailNameBlock.appendChild(labelEmail); |
| 153 emailNameBlock.appendChild(labelName); | 153 emailNameBlock.appendChild(labelName); |
| 154 emailNameBlock.title = this.user.owner ? | 154 emailNameBlock.title = this.user.owner ? |
| 155 localStrings.getStringF('username_format', this.user.email) : | 155 loadTimeData.getStringF('username_format', this.user.email) : |
| 156 this.user.email; | 156 this.user.email; |
| 157 | 157 |
| 158 this.appendChild(this.icon_); | 158 this.appendChild(this.icon_); |
| 159 this.appendChild(emailNameBlock); | 159 this.appendChild(emailNameBlock); |
| 160 | 160 |
| 161 if (!this.user.owner) { | 161 if (!this.user.owner) { |
| 162 var removeButton = this.ownerDocument.createElement('button'); | 162 var removeButton = this.ownerDocument.createElement('button'); |
| 163 removeButton.className = | 163 removeButton.className = |
| 164 'raw-button remove-user-button custom-appearance'; | 164 'raw-button remove-user-button custom-appearance'; |
| 165 removeButton.addEventListener( | 165 removeButton.addEventListener( |
| (...skipping 19 matching lines...) Expand all Loading... |
| 185 updatePicture: function() { | 185 updatePicture: function() { |
| 186 this.icon_.src = 'chrome://userimage/' + this.user.username + | 186 this.icon_.src = 'chrome://userimage/' + this.user.username + |
| 187 '?id=' + (new Date()).getTime(); | 187 '?id=' + (new Date()).getTime(); |
| 188 } | 188 } |
| 189 }; | 189 }; |
| 190 | 190 |
| 191 return { | 191 return { |
| 192 UserList: UserList | 192 UserList: UserList |
| 193 }; | 193 }; |
| 194 }); | 194 }); |
| OLD | NEW |