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

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

Issue 560563004: Compile chrome://settings, part 5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_make_public
Patch Set: fixed assert errors Created 6 years, 3 months 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.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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 return this.dataItem; 240 return this.dataItem;
241 }, 241 },
242 set url(url) { 242 set url(url) {
243 this.dataItem = url; 243 this.dataItem = url;
244 }, 244 },
245 }; 245 };
246 246
247 /** 247 /**
248 * Create a new passwords list. 248 * Create a new passwords list.
249 * @constructor 249 * @constructor
250 * @extends {cr.ui.List} 250 * @extends {options.DeletableItemList}
251 */ 251 */
252 var PasswordsList = cr.ui.define('list'); 252 var PasswordsList = cr.ui.define('list');
253 253
254 PasswordsList.prototype = { 254 PasswordsList.prototype = {
255 __proto__: DeletableItemList.prototype, 255 __proto__: DeletableItemList.prototype,
256 256
257 /** 257 /**
258 * Whether passwords can be revealed or not. 258 * Whether passwords can be revealed or not.
259 * @type {boolean} 259 * @type {boolean}
260 * @private 260 * @private
(...skipping 11 matching lines...) Expand all
272 /** 272 /**
273 * Listener for changes on the preference. 273 * Listener for changes on the preference.
274 * @param {Event} event The preference update event. 274 * @param {Event} event The preference update event.
275 * @private 275 * @private
276 */ 276 */
277 onPreferenceChanged_: function(event) { 277 onPreferenceChanged_: function(event) {
278 this.showPasswords_ = event.value.value; 278 this.showPasswords_ = event.value.value;
279 this.redraw(); 279 this.redraw();
280 }, 280 },
281 281
282 /** @override */ 282 /**
283 * @override
284 * @param {Array} entry
285 */
283 createItem: function(entry) { 286 createItem: function(entry) {
284 var showPasswords = this.showPasswords_; 287 var showPasswords = this.showPasswords_;
285 288
286 if (loadTimeData.getBoolean('disableShowPasswords')) 289 if (loadTimeData.getBoolean('disableShowPasswords'))
287 showPasswords = false; 290 showPasswords = false;
288 291
289 return new PasswordListItem(this.dataModel, entry, showPasswords); 292 return new PasswordListItem(this.dataModel, entry, showPasswords);
290 }, 293 },
291 294
292 /** @override */ 295 /** @override */
(...skipping 17 matching lines...) Expand all
310 /** 313 /**
311 * Create a new passwords list. 314 * Create a new passwords list.
312 * @constructor 315 * @constructor
313 * @extends {cr.ui.List} 316 * @extends {cr.ui.List}
314 */ 317 */
315 var PasswordExceptionsList = cr.ui.define('list'); 318 var PasswordExceptionsList = cr.ui.define('list');
316 319
317 PasswordExceptionsList.prototype = { 320 PasswordExceptionsList.prototype = {
318 __proto__: DeletableItemList.prototype, 321 __proto__: DeletableItemList.prototype,
319 322
320 /** @override */ 323 /**
324 * @override
325 * @param {Array} entry
326 */
321 createItem: function(entry) { 327 createItem: function(entry) {
322 return new PasswordExceptionsListItem(entry); 328 return new PasswordExceptionsListItem(entry);
323 }, 329 },
324 330
325 /** @override */ 331 /** @override */
326 deleteItemAtIndex: function(index) { 332 deleteItemAtIndex: function(index) {
327 PasswordManager.removePasswordException(index); 333 PasswordManager.removePasswordException(index);
328 }, 334 },
329 335
330 /** 336 /**
331 * The length of the list. 337 * The length of the list.
332 */ 338 */
333 get length() { 339 get length() {
334 return this.dataModel.length; 340 return this.dataModel.length;
335 }, 341 },
336 }; 342 };
337 343
338 return { 344 return {
339 PasswordListItem: PasswordListItem, 345 PasswordListItem: PasswordListItem,
340 PasswordExceptionsListItem: PasswordExceptionsListItem, 346 PasswordExceptionsListItem: PasswordExceptionsListItem,
341 PasswordsList: PasswordsList, 347 PasswordsList: PasswordsList,
342 PasswordExceptionsList: PasswordExceptionsList, 348 PasswordExceptionsList: PasswordExceptionsList,
343 }; 349 };
344 }); 350 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/language_add_language_overlay.js ('k') | chrome/browser/resources/options/pref_ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698