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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 index = i; | 218 index = i; |
219 break; | 219 break; |
220 } | 220 } |
221 } | 221 } |
222 } | 222 } |
223 | 223 |
224 // Reveal the password in the UI. | 224 // Reveal the password in the UI. |
225 var item = this.savedPasswordsList_.getListItemByIndex(index); | 225 var item = this.savedPasswordsList_.getListItemByIndex(index); |
226 item.showPassword(password); | 226 item.showPassword(password); |
227 }, | 227 }, |
228 | |
229 /** | |
230 * @param {boolean} visible Whether the link should be visible. | |
231 * @private | |
232 */ | |
233 setManageAccountLinkVisibility_: function(visible) { | |
234 $('manage-passwords-span').hidden = !visible; | |
235 }, | |
236 }; | 228 }; |
237 | 229 |
238 /** | 230 /** |
239 * Removes a saved password. | 231 * Removes a saved password. |
240 * @param {number} rowIndex indicating the row to remove. | 232 * @param {number} rowIndex indicating the row to remove. |
241 */ | 233 */ |
242 PasswordManager.removeSavedPassword = function(rowIndex) { | 234 PasswordManager.removeSavedPassword = function(rowIndex) { |
243 chrome.send('removeSavedPassword', [String(rowIndex)]); | 235 chrome.send('removeSavedPassword', [String(rowIndex)]); |
244 chrome.send('coreOptionsUserMetricsAction', | 236 chrome.send('coreOptionsUserMetricsAction', |
245 ['Options_PasswordManagerDeletePassword']); | 237 ['Options_PasswordManagerDeletePassword']); |
(...skipping 18 matching lines...) Expand all Loading... |
264 'setPasswordExceptionsList', | 256 'setPasswordExceptionsList', |
265 'showPassword' | 257 'showPassword' |
266 ]); | 258 ]); |
267 | 259 |
268 // Export | 260 // Export |
269 return { | 261 return { |
270 PasswordManager: PasswordManager | 262 PasswordManager: PasswordManager |
271 }; | 263 }; |
272 | 264 |
273 }); | 265 }); |
OLD | NEW |