Index: chrome/browser/resources/options/autofill_options_list.js |
diff --git a/chrome/browser/resources/options/autofill_options_list.js b/chrome/browser/resources/options/autofill_options_list.js |
index aa3198dde05e076c6ae43459c73b7bd84d2bff83..8bcfafe6038f0ebad06c5bf4a1c209cf620e51bb 100644 |
--- a/chrome/browser/resources/options/autofill_options_list.js |
+++ b/chrome/browser/resources/options/autofill_options_list.js |
@@ -12,7 +12,8 @@ cr.define('options.autofillOptions', function() { |
* @return {!HTMLButtonElement} |
*/ |
function AutofillEditProfileButton(guid, edit) { |
- var editButtonEl = document.createElement('button'); |
+ var editButtonEl = /** @type {HTMLButtonElement} */( |
+ document.createElement('button')); |
editButtonEl.className = 'list-inline-button custom-appearance'; |
editButtonEl.textContent = |
loadTimeData.getString('autofillEditProfileButton'); |
@@ -112,7 +113,8 @@ cr.define('options.autofillOptions', function() { |
/** |
* Creates a new value list item. |
- * @param {AutofillValuesList} list The parent list of this item. |
+ * @param {options.autofillOptions.AutofillValuesList} list The parent list of |
+ * this item. |
* @param {string} entry A string value. |
* @constructor |
* @extends {options.InlineEditableItem} |
@@ -138,7 +140,7 @@ cr.define('options.autofillOptions', function() { |
this.isPlaceholder = !this.value; |
// The stored value. |
- var cell = this.createEditableTextCell(this.value); |
+ var cell = this.createEditableTextCell(String(this.value)); |
this.contentElement.appendChild(cell); |
this.input = cell.querySelector('input'); |
@@ -151,7 +153,7 @@ cr.define('options.autofillOptions', function() { |
}, |
/** |
- * @return {string} This item's value. |
+ * @return {Array} This item's value. |
* @protected |
*/ |
value_: function() { |
@@ -159,7 +161,7 @@ cr.define('options.autofillOptions', function() { |
}, |
/** |
- * @param {Object} value The value to test. |
+ * @param {*} value The value to test. |
* @return {boolean} True if the given value is non-empty. |
* @protected |
*/ |
@@ -226,7 +228,7 @@ cr.define('options.autofillOptions', function() { |
* list of this item. |
* @param {Array.<string>} entry An array of [first, middle, last] names. |
* @constructor |
- * @extends {options.ValuesListItem} |
+ * @extends {options.autofillOptions.ValuesListItem} |
*/ |
function NameListItem(list, entry) { |
var el = cr.doc.createElement('div'); |
@@ -338,7 +340,7 @@ cr.define('options.autofillOptions', function() { |
/** |
* Create a new address list. |
* @constructor |
- * @extends {options.AutofillProfileList} |
+ * @extends {options.autofillOptions.AutofillProfileList} |
*/ |
var AutofillAddressList = cr.ui.define('list'); |
@@ -356,7 +358,7 @@ cr.define('options.autofillOptions', function() { |
/** @override */ |
createItem: function(entry) { |
- return new AddressListItem(entry); |
+ return new AddressListItem(/** @type {Array} */(entry)); |
}, |
/** @override */ |
@@ -386,7 +388,7 @@ cr.define('options.autofillOptions', function() { |
/** @override */ |
createItem: function(entry) { |
- return new CreditCardListItem(entry); |
+ return new CreditCardListItem(/** @type {Array} */(entry)); |
}, |
/** @override */ |
@@ -407,7 +409,7 @@ cr.define('options.autofillOptions', function() { |
/** @override */ |
createItem: function(entry) { |
- return new ValuesListItem(this, entry); |
+ return new ValuesListItem(this, /** @type {string} */(entry)); |
}, |
/** @override */ |
@@ -463,7 +465,7 @@ cr.define('options.autofillOptions', function() { |
/** |
* Create a new value list for phone number validation. |
* @constructor |
- * @extends {options.AutofillValuesList} |
+ * @extends {options.autofillOptions.AutofillValuesList} |
*/ |
var AutofillNameValuesList = cr.ui.define('list'); |
@@ -472,14 +474,14 @@ cr.define('options.autofillOptions', function() { |
/** @override */ |
createItem: function(entry) { |
- return new NameListItem(this, entry); |
+ return new NameListItem(this, /** @type {Array.<string>} */(entry)); |
}, |
}; |
/** |
* Create a new value list for phone number validation. |
* @constructor |
- * @extends {options.AutofillValuesList} |
+ * @extends {options.autofillOptions.AutofillValuesList} |
*/ |
var AutofillPhoneValuesList = cr.ui.define('list'); |
@@ -542,6 +544,7 @@ cr.define('options.autofillOptions', function() { |
}; |
return { |
+ AutofillProfileList: AutofillProfileList, |
AddressListItem: AddressListItem, |
CreditCardListItem: CreditCardListItem, |
ValuesListItem: ValuesListItem, |