| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 decorate: function() { | 68 decorate: function() { |
| 69 DeletableItem.prototype.decorate.call(this); | 69 DeletableItem.prototype.decorate.call(this); |
| 70 | 70 |
| 71 // The URL of the site. | 71 // The URL of the site. |
| 72 var urlDiv = this.ownerDocument.createElement('div'); | 72 var urlDiv = this.ownerDocument.createElement('div'); |
| 73 urlDiv.className = 'favicon-cell left-elided-url url'; | 73 urlDiv.className = 'favicon-cell left-elided-url url'; |
| 74 urlDiv.setAttribute( | 74 urlDiv.setAttribute( |
| 75 'title', getTitleForPasswordOrigin(this.url, this.isUrlSecure)); | 75 'title', getTitleForPasswordOrigin(this.url, this.isUrlSecure)); |
| 76 var urlLink = this.ownerDocument.createElement('a'); | 76 var urlLink = this.ownerDocument.createElement('a'); |
| 77 urlLink.href = this.url; | 77 urlLink.href = this.url; |
| 78 urlLink.setAttribute('target', '_blank'); |
| 78 urlLink.textContent = this.shownUrl.split('').reverse().join(''); | 79 urlLink.textContent = this.shownUrl.split('').reverse().join(''); |
| 79 urlDiv.appendChild(urlLink); | 80 urlDiv.appendChild(urlLink); |
| 80 urlDiv.style.backgroundImage = getFaviconImageSet( | 81 urlDiv.style.backgroundImage = getFaviconImageSet( |
| 81 'origin/' + this.url, 16); | 82 'origin/' + this.url, 16); |
| 82 this.contentElement.appendChild(urlDiv); | 83 this.contentElement.appendChild(urlDiv); |
| 83 | 84 |
| 84 // The stored username. | 85 // The stored username. |
| 85 var usernameDiv = this.ownerDocument.createElement('div'); | 86 var usernameDiv = this.ownerDocument.createElement('div'); |
| 86 usernameDiv.className = 'name'; | 87 usernameDiv.className = 'name'; |
| 87 usernameDiv.title = this.username; | 88 usernameDiv.title = this.username; |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 // The URL of the site. | 317 // The URL of the site. |
| 317 var urlDiv = this.ownerDocument.createElement('div'); | 318 var urlDiv = this.ownerDocument.createElement('div'); |
| 318 urlDiv.className = 'url'; | 319 urlDiv.className = 'url'; |
| 319 urlDiv.classList.add('favicon-cell'); | 320 urlDiv.classList.add('favicon-cell'); |
| 320 urlDiv.classList.add('left-elided-url'); | 321 urlDiv.classList.add('left-elided-url'); |
| 321 urlDiv.setAttribute( | 322 urlDiv.setAttribute( |
| 322 'title', getTitleForPasswordOrigin(this.url, this.isUrlSecure)); | 323 'title', getTitleForPasswordOrigin(this.url, this.isUrlSecure)); |
| 323 var urlLink = this.ownerDocument.createElement('a'); | 324 var urlLink = this.ownerDocument.createElement('a'); |
| 324 urlLink.href = this.url; | 325 urlLink.href = this.url; |
| 325 urlLink.textContent = this.shownUrl.split('').reverse().join(''); | 326 urlLink.textContent = this.shownUrl.split('').reverse().join(''); |
| 327 urlLink.setAttribute('target', '_blank'); |
| 326 urlDiv.appendChild(urlLink); | 328 urlDiv.appendChild(urlLink); |
| 327 urlDiv.style.backgroundImage = getFaviconImageSet( | 329 urlDiv.style.backgroundImage = getFaviconImageSet( |
| 328 'origin/' + this.url, 16); | 330 'origin/' + this.url, 16); |
| 329 this.contentElement.appendChild(urlDiv); | 331 this.contentElement.appendChild(urlDiv); |
| 330 }, | 332 }, |
| 331 | 333 |
| 332 /** | 334 /** |
| 333 * Get the url for the entry. | 335 * Get the url for the entry. |
| 334 * @type {string} | 336 * @type {string} |
| 335 */ | 337 */ |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 PasswordExceptionsList: PasswordExceptionsList, | 481 PasswordExceptionsList: PasswordExceptionsList, |
| 480 ORIGIN_FIELD: ORIGIN_FIELD, | 482 ORIGIN_FIELD: ORIGIN_FIELD, |
| 481 SHOWN_URL_FIELD: SHOWN_URL_FIELD, | 483 SHOWN_URL_FIELD: SHOWN_URL_FIELD, |
| 482 IS_SECURE_FIELD: IS_SECURE_FIELD, | 484 IS_SECURE_FIELD: IS_SECURE_FIELD, |
| 483 USERNAME_FIELD: USERNAME_FIELD, | 485 USERNAME_FIELD: USERNAME_FIELD, |
| 484 PASSWORD_FIELD: PASSWORD_FIELD, | 486 PASSWORD_FIELD: PASSWORD_FIELD, |
| 485 FEDERATION_FIELD: FEDERATION_FIELD, | 487 FEDERATION_FIELD: FEDERATION_FIELD, |
| 486 ORIGINAL_INDEX_FIELD: ORIGINAL_INDEX_FIELD | 488 ORIGINAL_INDEX_FIELD: ORIGINAL_INDEX_FIELD |
| 487 }; | 489 }; |
| 488 }); | 490 }); |
| OLD | NEW |