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

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

Issue 107023009: Disable ability to show passwords when running in Metro. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
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.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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 /** 270 /**
271 * Listener for changes on the preference. 271 * Listener for changes on the preference.
272 * @param {Event} event The preference update event. 272 * @param {Event} event The preference update event.
273 * @private 273 * @private
274 */ 274 */
275 onPreferenceChanged_: function(event) { 275 onPreferenceChanged_: function(event) {
276 this.showPasswords_ = event.value.value; 276 this.showPasswords_ = event.value.value;
277 this.redraw(); 277 this.redraw();
278 }, 278 },
279 279
280 /**
281 * Removes the show password button. This is called by the backend when
282 * we are running in an environment that does not support showing
283 * passwords, such as Windows Metro
284 */
285 disableShowPassword: function() {
286 this.showPasswords_ = false;
287 this.redraw();
288 },
289
280 /** @override */ 290 /** @override */
281 createItem: function(entry) { 291 createItem: function(entry) {
282 return new PasswordListItem(this.dataModel, entry, this.showPasswords_); 292 return new PasswordListItem(this.dataModel, entry, this.showPasswords_);
283 }, 293 },
284 294
285 /** @override */ 295 /** @override */
286 deleteItemAtIndex: function(index) { 296 deleteItemAtIndex: function(index) {
287 var item = this.dataModel.item(index); 297 var item = this.dataModel.item(index);
288 if (item && item.length > 3) { 298 if (item && item.length > 3) {
289 // The fourth element, if present, is the original index to delete. 299 // The fourth element, if present, is the original index to delete.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 }, 338 },
329 }; 339 };
330 340
331 return { 341 return {
332 PasswordListItem: PasswordListItem, 342 PasswordListItem: PasswordListItem,
333 PasswordExceptionsListItem: PasswordExceptionsListItem, 343 PasswordExceptionsListItem: PasswordExceptionsListItem,
334 PasswordsList: PasswordsList, 344 PasswordsList: PasswordsList,
335 PasswordExceptionsList: PasswordExceptionsList, 345 PasswordExceptionsList: PasswordExceptionsList,
336 }; 346 };
337 }); 347 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698