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', function() { | 5 cr.define('options', function() { |
6 /** @const */ var Page = cr.ui.pageManager.Page; | 6 /** @const */ var Page = cr.ui.pageManager.Page; |
7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; | 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; |
8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
9 | 9 |
10 ///////////////////////////////////////////////////////////////////////////// | 10 ///////////////////////////////////////////////////////////////////////////// |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 } | 204 } |
205 } | 205 } |
206 | 206 |
207 // Reveal the password in the UI. | 207 // Reveal the password in the UI. |
208 var item = this.savedPasswordsList_.getListItemByIndex(index); | 208 var item = this.savedPasswordsList_.getListItemByIndex(index); |
209 item.showPassword(password); | 209 item.showPassword(password); |
210 }, | 210 }, |
211 }; | 211 }; |
212 | 212 |
213 /** | 213 /** |
| 214 * Updates the password value of an entry. |
| 215 * @param {number} rowIndex The row to update. |
| 216 * @param {string} newPassword The new password value. |
| 217 */ |
| 218 PasswordManager.updatePassword = function(rowIndex, newPassword) { |
| 219 chrome.send('updatePassword', [String(rowIndex), newPassword]); |
| 220 }; |
| 221 |
| 222 /** |
214 * Removes a saved password. | 223 * Removes a saved password. |
215 * @param {number} rowIndex indicating the row to remove. | 224 * @param {number} rowIndex indicating the row to remove. |
216 */ | 225 */ |
217 PasswordManager.removeSavedPassword = function(rowIndex) { | 226 PasswordManager.removeSavedPassword = function(rowIndex) { |
218 chrome.send('removeSavedPassword', [String(rowIndex)]); | 227 chrome.send('removeSavedPassword', [String(rowIndex)]); |
219 }; | 228 }; |
220 | 229 |
221 /** | 230 /** |
222 * Removes a password exception. | 231 * Removes a password exception. |
223 * @param {number} rowIndex indicating the row to remove. | 232 * @param {number} rowIndex indicating the row to remove. |
(...skipping 17 matching lines...) Expand all Loading... |
241 return instance[name + '_'].apply(instance, arguments); | 250 return instance[name + '_'].apply(instance, arguments); |
242 }; | 251 }; |
243 }); | 252 }); |
244 | 253 |
245 // Export | 254 // Export |
246 return { | 255 return { |
247 PasswordManager: PasswordManager | 256 PasswordManager: PasswordManager |
248 }; | 257 }; |
249 | 258 |
250 }); | 259 }); |
OLD | NEW |