| 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 26 matching lines...) Expand all Loading... |
| 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 | 41 |
| 42 // The favicon URL is prefixed with "origin/", which essentially removes | 42 // The favicon URL is prefixed with "origin/", which essentially removes |
| 43 // the URL path past the top-level domain and ensures that a scheme (e.g., | 43 // the URL path past the top-level domain and ensures that a scheme (e.g., |
| 44 // http) is being used. This ensures that the favicon returned is the | 44 // http) is being used. This ensures that the favicon returned is the |
| 45 // default favicon for the domain and that the URL has a scheme if none | 45 // default favicon for the domain and that the URL has a scheme if none |
| 46 // is present in the password manager. | 46 // is present in the password manager. |
| 47 urlLabel.style.backgroundImage = | 47 urlLabel.style.backgroundImage = getFaviconImageSet( |
| 48 url('chrome://favicon/origin/' + this.url); | 48 'origin/' + this.url, 16); |
| 49 this.contentElement.appendChild(urlLabel); | 49 this.contentElement.appendChild(urlLabel); |
| 50 | 50 |
| 51 // The stored username. | 51 // The stored username. |
| 52 var usernameLabel = this.ownerDocument.createElement('div'); | 52 var usernameLabel = this.ownerDocument.createElement('div'); |
| 53 usernameLabel.className = 'name'; | 53 usernameLabel.className = 'name'; |
| 54 usernameLabel.textContent = this.username; | 54 usernameLabel.textContent = this.username; |
| 55 this.contentElement.appendChild(usernameLabel); | 55 this.contentElement.appendChild(usernameLabel); |
| 56 | 56 |
| 57 // The stored password. | 57 // The stored password. |
| 58 var passwordInputDiv = this.ownerDocument.createElement('div'); | 58 var passwordInputDiv = this.ownerDocument.createElement('div'); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 urlLabel.className = 'url'; | 178 urlLabel.className = 'url'; |
| 179 urlLabel.classList.add('favicon-cell'); | 179 urlLabel.classList.add('favicon-cell'); |
| 180 urlLabel.classList.add('weakrtl'); | 180 urlLabel.classList.add('weakrtl'); |
| 181 urlLabel.textContent = this.url; | 181 urlLabel.textContent = this.url; |
| 182 | 182 |
| 183 // The favicon URL is prefixed with "origin/", which essentially removes | 183 // The favicon URL is prefixed with "origin/", which essentially removes |
| 184 // the URL path past the top-level domain and ensures that a scheme (e.g., | 184 // the URL path past the top-level domain and ensures that a scheme (e.g., |
| 185 // http) is being used. This ensures that the favicon returned is the | 185 // http) is being used. This ensures that the favicon returned is the |
| 186 // default favicon for the domain and that the URL has a scheme if none | 186 // default favicon for the domain and that the URL has a scheme if none |
| 187 // is present in the password manager. | 187 // is present in the password manager. |
| 188 urlLabel.style.backgroundImage = | 188 urlLabel.style.backgroundImage = getFaviconImageSet( |
| 189 url('chrome://favicon/origin/' + this.url); | 189 'origin/' + this.url, 16); |
| 190 this.contentElement.appendChild(urlLabel); | 190 this.contentElement.appendChild(urlLabel); |
| 191 }, | 191 }, |
| 192 | 192 |
| 193 /** | 193 /** |
| 194 * Get the url for the entry. | 194 * Get the url for the entry. |
| 195 * @type {string} | 195 * @type {string} |
| 196 */ | 196 */ |
| 197 get url() { | 197 get url() { |
| 198 return this.dataItem; | 198 return this.dataItem; |
| 199 }, | 199 }, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 }, | 288 }, |
| 289 }; | 289 }; |
| 290 | 290 |
| 291 return { | 291 return { |
| 292 PasswordListItem: PasswordListItem, | 292 PasswordListItem: PasswordListItem, |
| 293 PasswordExceptionsListItem: PasswordExceptionsListItem, | 293 PasswordExceptionsListItem: PasswordExceptionsListItem, |
| 294 PasswordsList: PasswordsList, | 294 PasswordsList: PasswordsList, |
| 295 PasswordExceptionsList: PasswordExceptionsList, | 295 PasswordExceptionsList: PasswordExceptionsList, |
| 296 }; | 296 }; |
| 297 }); | 297 }); |
| OLD | NEW |