| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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.autoFillOptions', function() { | 5 cr.define('options.autoFillOptions', function() { |
| 6 const DeletableItemList = options.DeletableItemList; | 6 const DeletableItemList = options.DeletableItemList; |
| 7 const DeletableItem = options.DeletableItem; | 7 const DeletableItem = options.DeletableItem; |
| 8 const List = cr.ui.List; | 8 const List = cr.ui.List; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 /** @inheritDoc */ | 29 /** @inheritDoc */ |
| 30 decorate: function() { | 30 decorate: function() { |
| 31 DeletableItem.prototype.decorate.call(this); | 31 DeletableItem.prototype.decorate.call(this); |
| 32 | 32 |
| 33 // The stored label. | 33 // The stored label. |
| 34 var label = this.ownerDocument.createElement('div'); | 34 var label = this.ownerDocument.createElement('div'); |
| 35 label.className = 'autofill-list-item'; | 35 label.className = 'autofill-list-item'; |
| 36 label.textContent = this.label; | 36 label.textContent = this.label; |
| 37 this.contentElement.appendChild(label); | 37 this.contentElement.appendChild(label); |
| 38 }, | 38 }, |
| 39 | |
| 40 /** | |
| 41 * Get and set the GUID for the entry. | |
| 42 * @type {string} | |
| 43 */ | |
| 44 get guid() { | |
| 45 return this.guid; | |
| 46 }, | |
| 47 set guid(guid) { | |
| 48 this.guid = guid; | |
| 49 }, | |
| 50 | |
| 51 /** | |
| 52 * Get and set the label for the entry. | |
| 53 * @type {string} | |
| 54 */ | |
| 55 get label() { | |
| 56 return this.label; | |
| 57 }, | |
| 58 set label(label) { | |
| 59 this.label = label; | |
| 60 }, | |
| 61 }; | 39 }; |
| 62 | 40 |
| 63 /** | 41 /** |
| 64 * Create a new AutoFill list. | 42 * Create a new AutoFill list. |
| 65 * @constructor | 43 * @constructor |
| 66 * @extends {options.DeletableItemList} | 44 * @extends {options.DeletableItemList} |
| 67 */ | 45 */ |
| 68 var AutoFillList = cr.ui.define('list'); | 46 var AutoFillList = cr.ui.define('list'); |
| 69 | 47 |
| 70 AutoFillList.prototype = { | 48 AutoFillList.prototype = { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 84 deleteItemAtIndex: function(index) { | 62 deleteItemAtIndex: function(index) { |
| 85 AutoFillOptions.removeAutoFillProfile(this.dataModel.item(index)[0]); | 63 AutoFillOptions.removeAutoFillProfile(this.dataModel.item(index)[0]); |
| 86 }, | 64 }, |
| 87 }; | 65 }; |
| 88 | 66 |
| 89 return { | 67 return { |
| 90 AutoFillListItem: AutoFillListItem, | 68 AutoFillListItem: AutoFillListItem, |
| 91 AutoFillList: AutoFillList, | 69 AutoFillList: AutoFillList, |
| 92 }; | 70 }; |
| 93 }); | 71 }); |
| OLD | NEW |