| Index: chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js
|
| diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js b/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js
|
| index 9801b6eb42079a265972363f6d0278302e5efe27..1aa535287a78ffbf825b7f21865d3865591865ce 100644
|
| --- a/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js
|
| +++ b/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js
|
| @@ -7,9 +7,63 @@
|
| * addresses and credit cards for use in autofill.
|
| */
|
| (function() {
|
| -'use strict';
|
| + 'use strict';
|
|
|
| -Polymer({
|
| - is: 'settings-autofill-section',
|
| -});
|
| + Polymer({
|
| + is: 'settings-autofill-section',
|
| +
|
| + properties: {
|
| + /**
|
| + * An array of saved addresses.
|
| + * @type {!Array<!chrome.autofillPrivate.AddressEntry>}
|
| + */
|
| + addresses: {
|
| + type: Array,
|
| + },
|
| +
|
| + /**
|
| + * An array of saved addresses.
|
| + * @type {!Array<!chrome.autofillPrivate.CreditCardEntry>}
|
| + */
|
| + creditCards: {
|
| + type: Array,
|
| + },
|
| + },
|
| +
|
| + /**
|
| + * Formats an AddressEntry so it's displayed as an address.
|
| + * @param {!chrome.autofillPrivate.AddressEntry} item
|
| + * @return {!string}
|
| + */
|
| + address_: function(item) {
|
| + return item.metadata.summaryLabel + item.metadata.summarySublabel;
|
| + },
|
| +
|
| + /**
|
| + * Formats the expiration date so it's displayed as MM/YYYY.
|
| + * @param {!chrome.autofillPrivate.CreditCardEntry} item
|
| + * @return {!string}
|
| + */
|
| + expiration_: function(item) {
|
| + return item.expirationMonth + '/' + item.expirationYear;
|
| + },
|
| +
|
| + /**
|
| + * Handles tapping on the "Add address" button.
|
| + * @param {!Event} e
|
| + */
|
| + onAddAddressTap_: function(e) {
|
| + // TODO(hcarmona): implement this.
|
| + e.preventDefault();
|
| + },
|
| +
|
| + /**
|
| + * Handles tapping on the "Add credit card" button.
|
| + * @param {!Event} e
|
| + */
|
| + onAddCreditCardTap_: function(e) {
|
| + // TODO(hcarmona): implement this.
|
| + e.preventDefault();
|
| + },
|
| + });
|
| })();
|
|
|