| OLD | NEW |
| 1 // Copyright (c) 2011 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 ArrayDataModel = cr.ui.ArrayDataModel; | 6 const ArrayDataModel = cr.ui.ArrayDataModel; |
| 7 const DeletableItemList = options.DeletableItemList; | 7 const DeletableItemList = options.DeletableItemList; |
| 8 const DeletableItem = options.DeletableItem; | 8 const DeletableItem = options.DeletableItem; |
| 9 const List = cr.ui.List; | 9 const List = cr.ui.List; |
| 10 | 10 |
| 11 /** | 11 /** |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 * Whether passwords can be revealed or not. | 202 * Whether passwords can be revealed or not. |
| 203 * @type {boolean} | 203 * @type {boolean} |
| 204 * @private | 204 * @private |
| 205 */ | 205 */ |
| 206 showPasswords_: true, | 206 showPasswords_: true, |
| 207 | 207 |
| 208 /** @inheritDoc */ | 208 /** @inheritDoc */ |
| 209 decorate: function() { | 209 decorate: function() { |
| 210 DeletableItemList.prototype.decorate.call(this); | 210 DeletableItemList.prototype.decorate.call(this); |
| 211 Preferences.getInstance().addEventListener( | 211 Preferences.getInstance().addEventListener( |
| 212 "profile.password_manager_allow_show_passwords", | 212 'profile.password_manager_allow_show_passwords', |
| 213 this.onPreferenceChanged_.bind(this)); | 213 this.onPreferenceChanged_.bind(this)); |
| 214 }, | 214 }, |
| 215 | 215 |
| 216 /** | 216 /** |
| 217 * Listener for changes on the preference. | 217 * Listener for changes on the preference. |
| 218 * @param {Event} event The preference update event. | 218 * @param {Event} event The preference update event. |
| 219 * @private | 219 * @private |
| 220 */ | 220 */ |
| 221 onPreferenceChanged_: function(event) { | 221 onPreferenceChanged_: function(event) { |
| 222 this.showPasswords_ = event.value.value; | 222 this.showPasswords_ = event.value.value; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 }, | 274 }, |
| 275 }; | 275 }; |
| 276 | 276 |
| 277 return { | 277 return { |
| 278 PasswordListItem: PasswordListItem, | 278 PasswordListItem: PasswordListItem, |
| 279 PasswordExceptionsListItem: PasswordExceptionsListItem, | 279 PasswordExceptionsListItem: PasswordExceptionsListItem, |
| 280 PasswordsList: PasswordsList, | 280 PasswordsList: PasswordsList, |
| 281 PasswordExceptionsList: PasswordExceptionsList, | 281 PasswordExceptionsList: PasswordExceptionsList, |
| 282 }; | 282 }; |
| 283 }); | 283 }); |
| OLD | NEW |