Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(725)

Side by Side Diff: chrome/browser/resources/options/password_manager.js

Issue 682133003: [Password Manager] Add link to remotely manage passowrds on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 index = i; 206 index = i;
207 break; 207 break;
208 } 208 }
209 } 209 }
210 } 210 }
211 211
212 // Reveal the password in the UI. 212 // Reveal the password in the UI.
213 var item = this.savedPasswordsList_.getListItemByIndex(index); 213 var item = this.savedPasswordsList_.getListItemByIndex(index);
214 item.showPassword(password); 214 item.showPassword(password);
215 }, 215 },
216
217 setManageAccountLinkVisibility_: function(visible) {
218 if (visible)
219 $('manage-passwords-span').style.display = 'block';
Evan Stade 2014/10/28 22:50:48 $('manage-passwords-span').hidden = !visible;
Garrett Casto 2014/10/28 23:18:55 Done.
220 else
221 $('manage-passwords-span').style.display = 'none';
222 },
216 }; 223 };
217 224
218 /** 225 /**
219 * Removes a saved password. 226 * Removes a saved password.
220 * @param {number} rowIndex indicating the row to remove. 227 * @param {number} rowIndex indicating the row to remove.
221 */ 228 */
222 PasswordManager.removeSavedPassword = function(rowIndex) { 229 PasswordManager.removeSavedPassword = function(rowIndex) {
223 chrome.send('removeSavedPassword', [String(rowIndex)]); 230 chrome.send('removeSavedPassword', [String(rowIndex)]);
224 }; 231 };
225 232
226 /** 233 /**
227 * Removes a password exception. 234 * Removes a password exception.
228 * @param {number} rowIndex indicating the row to remove. 235 * @param {number} rowIndex indicating the row to remove.
229 */ 236 */
230 PasswordManager.removePasswordException = function(rowIndex) { 237 PasswordManager.removePasswordException = function(rowIndex) {
231 chrome.send('removePasswordException', [String(rowIndex)]); 238 chrome.send('removePasswordException', [String(rowIndex)]);
232 }; 239 };
233 240
234 PasswordManager.requestShowPassword = function(index) { 241 PasswordManager.requestShowPassword = function(index) {
235 chrome.send('requestShowPassword', [index]); 242 chrome.send('requestShowPassword', [index]);
236 }; 243 };
237 244
238 // Forward public APIs to private implementations on the singleton instance. 245 // Forward public APIs to private implementations on the singleton instance.
239 cr.makePublic(PasswordManager, [ 246 cr.makePublic(PasswordManager, [
247 'setManageAccountLinkVisibility',
240 'setSavedPasswordsList', 248 'setSavedPasswordsList',
241 'setPasswordExceptionsList', 249 'setPasswordExceptionsList',
242 'showPassword' 250 'showPassword'
243 ]); 251 ]);
244 252
245 // Export 253 // Export
246 return { 254 return {
247 PasswordManager: PasswordManager 255 PasswordManager: PasswordManager
248 }; 256 };
249 257
250 }); 258 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698