| 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.passwordManager', function() { | 5 cr.define('options.passwordManager', function() { |
| 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
| 7 /** @const */ var DeletableItemList = options.DeletableItemList; | 7 /** @const */ var DeletableItemList = options.DeletableItemList; |
| 8 /** @const */ var DeletableItem = options.DeletableItem; | 8 /** @const */ var DeletableItem = options.DeletableItem; |
| 9 /** @const */ var List = cr.ui.List; | 9 /** @const */ var List = cr.ui.List; |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 decorate: function(showPasswords) { | 31 decorate: function(showPasswords) { |
| 32 DeletableItem.prototype.decorate.call(this); | 32 DeletableItem.prototype.decorate.call(this); |
| 33 | 33 |
| 34 // The URL of the site. | 34 // The URL of the site. |
| 35 var urlLabel = this.ownerDocument.createElement('div'); | 35 var urlLabel = this.ownerDocument.createElement('div'); |
| 36 urlLabel.classList.add('favicon-cell'); | 36 urlLabel.classList.add('favicon-cell'); |
| 37 urlLabel.classList.add('weakrtl'); | 37 urlLabel.classList.add('weakrtl'); |
| 38 urlLabel.classList.add('url'); | 38 urlLabel.classList.add('url'); |
| 39 urlLabel.setAttribute('title', this.url); | 39 urlLabel.setAttribute('title', this.url); |
| 40 urlLabel.textContent = this.url; | 40 urlLabel.textContent = this.url; |
| 41 urlLabel.style.backgroundImage = url('chrome://favicon/' + this.url); | 41 urlLabel.style.backgroundImage = |
| 42 url('chrome://favicon/normalize/' + this.url); |
| 42 this.contentElement.appendChild(urlLabel); | 43 this.contentElement.appendChild(urlLabel); |
| 43 | 44 |
| 44 // The stored username. | 45 // The stored username. |
| 45 var usernameLabel = this.ownerDocument.createElement('div'); | 46 var usernameLabel = this.ownerDocument.createElement('div'); |
| 46 usernameLabel.className = 'name'; | 47 usernameLabel.className = 'name'; |
| 47 usernameLabel.textContent = this.username; | 48 usernameLabel.textContent = this.username; |
| 48 this.contentElement.appendChild(usernameLabel); | 49 this.contentElement.appendChild(usernameLabel); |
| 49 | 50 |
| 50 // The stored password. | 51 // The stored password. |
| 51 var passwordInputDiv = this.ownerDocument.createElement('div'); | 52 var passwordInputDiv = this.ownerDocument.createElement('div'); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 */ | 166 */ |
| 166 decorate: function() { | 167 decorate: function() { |
| 167 DeletableItem.prototype.decorate.call(this); | 168 DeletableItem.prototype.decorate.call(this); |
| 168 | 169 |
| 169 // The URL of the site. | 170 // The URL of the site. |
| 170 var urlLabel = this.ownerDocument.createElement('div'); | 171 var urlLabel = this.ownerDocument.createElement('div'); |
| 171 urlLabel.className = 'url'; | 172 urlLabel.className = 'url'; |
| 172 urlLabel.classList.add('favicon-cell'); | 173 urlLabel.classList.add('favicon-cell'); |
| 173 urlLabel.classList.add('weakrtl'); | 174 urlLabel.classList.add('weakrtl'); |
| 174 urlLabel.textContent = this.url; | 175 urlLabel.textContent = this.url; |
| 175 urlLabel.style.backgroundImage = url('chrome://favicon/' + this.url); | 176 urlLabel.style.backgroundImage = |
| 177 url('chrome://favicon/normalize/' + this.url); |
| 176 this.contentElement.appendChild(urlLabel); | 178 this.contentElement.appendChild(urlLabel); |
| 177 }, | 179 }, |
| 178 | 180 |
| 179 /** | 181 /** |
| 180 * Get the url for the entry. | 182 * Get the url for the entry. |
| 181 * @type {string} | 183 * @type {string} |
| 182 */ | 184 */ |
| 183 get url() { | 185 get url() { |
| 184 return this.dataItem; | 186 return this.dataItem; |
| 185 }, | 187 }, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 }, | 276 }, |
| 275 }; | 277 }; |
| 276 | 278 |
| 277 return { | 279 return { |
| 278 PasswordListItem: PasswordListItem, | 280 PasswordListItem: PasswordListItem, |
| 279 PasswordExceptionsListItem: PasswordExceptionsListItem, | 281 PasswordExceptionsListItem: PasswordExceptionsListItem, |
| 280 PasswordsList: PasswordsList, | 282 PasswordsList: PasswordsList, |
| 281 PasswordExceptionsList: PasswordExceptionsList, | 283 PasswordExceptionsList: PasswordExceptionsList, |
| 282 }; | 284 }; |
| 283 }); | 285 }); |
| OLD | NEW |