Don't preload rarely seen large images
[chromium-blink-merge.git] / third_party / closure_compiler / externs / autofill_private.js
blobbb34658a9a89309e289a08353c43a074f6f53af3
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 /** @fileoverview Externs generated from namespace: autofillPrivate */
7 /**
8  * @const
9  */
10 chrome.autofillPrivate = {};
12 /**
13  * @enum {string}
14  * @see https://developer.chrome.com/extensions/autofillPrivate#type-AddressField
15  */
16 chrome.autofillPrivate.AddressField = {
17   FULL_NAME: 'FULL_NAME',
18   COMPANY_NAME: 'COMPANY_NAME',
19   ADDRESS_LINES: 'ADDRESS_LINES',
20   ADDRESS_LEVEL_1: 'ADDRESS_LEVEL_1',
21   ADDRESS_LEVEL_2: 'ADDRESS_LEVEL_2',
22   ADDRESS_LEVEL_3: 'ADDRESS_LEVEL_3',
23   POSTAL_CODE: 'POSTAL_CODE',
24   SORTING_CODE: 'SORTING_CODE',
25   COUNTRY_CODE: 'COUNTRY_CODE',
28 /**
29  * @typedef {{
30  *   summaryLabel: string,
31  *   summarySublabel: (string|undefined),
32  *   isLocal: (boolean|undefined),
33  *   isCached: (boolean|undefined)
34  * }}
35  * @see https://developer.chrome.com/extensions/autofillPrivate#type-AutofillMetadata
36  */
37 var AutofillMetadata;
39 /**
40  * @typedef {{
41  *   guid: (string|undefined),
42  *   fullNames: (!Array<string>|undefined),
43  *   companyName: (string|undefined),
44  *   addressLines: (string|undefined),
45  *   addressLevel1: (string|undefined),
46  *   addressLevel2: (string|undefined),
47  *   addressLevel3: (string|undefined),
48  *   postalCode: (string|undefined),
49  *   sortingCode: (string|undefined),
50  *   countryCode: (string|undefined),
51  *   phoneNumbers: (!Array<string>|undefined),
52  *   emailAddresses: (!Array<string>|undefined),
53  *   languageCode: (string|undefined),
54  *   metadata: (AutofillMetadata|undefined)
55  * }}
56  * @see https://developer.chrome.com/extensions/autofillPrivate#type-AddressEntry
57  */
58 var AddressEntry;
60 /**
61  * @typedef {{
62  *   field: !chrome.autofillPrivate.AddressField,
63  *   fieldName: string,
64  *   isLongField: boolean,
65  *   placeholder: (string|undefined)
66  * }}
67  * @see https://developer.chrome.com/extensions/autofillPrivate#type-AddressComponent
68  */
69 var AddressComponent;
71 /**
72  * @typedef {{
73  *   row: !Array<AddressComponent>
74  * }}
75  * @see https://developer.chrome.com/extensions/autofillPrivate#type-AddressComponentRow
76  */
77 var AddressComponentRow;
79 /**
80  * @typedef {{
81  *   components: !Array<AddressComponentRow>,
82  *   languageCode: string
83  * }}
84  * @see https://developer.chrome.com/extensions/autofillPrivate#type-AddressComponents
85  */
86 var AddressComponents;
88 /**
89  * @typedef {{
90  *   guid: (string|undefined),
91  *   name: (string|undefined),
92  *   cardNumber: (string|undefined),
93  *   expirationMonth: (string|undefined),
94  *   expirationYear: (string|undefined),
95  *   metadata: (AutofillMetadata|undefined)
96  * }}
97  * @see https://developer.chrome.com/extensions/autofillPrivate#type-CreditCardEntry
98  */
99 var CreditCardEntry;
102  * @typedef {{
103  *   phoneNumbers: !Array<string>,
104  *   indexOfNewNumber: number,
105  *   countryCode: string
106  * }}
107  * @see https://developer.chrome.com/extensions/autofillPrivate#type-ValidatePhoneParams
108  */
109 var ValidatePhoneParams;
112  * Saves the given address. If |address| has an empty string as its ID, it will
113  * be assigned a new one and added as a new entry.
114  * @param {AddressEntry} address The address entry to save.
115  * @see https://developer.chrome.com/extensions/autofillPrivate#method-saveAddress
116  */
117 chrome.autofillPrivate.saveAddress = function(address) {};
120  * Gets the address components for a given country code.
121  * @param {string} countryCode A two-character string representing the address'
122  *     country     whose components should be returned. See autofill_country.cc
123  *     for a     list of valid codes.
124  * @param {function(AddressComponents):void} callback Callback which will be
125  *     called with components.
126  * @see https://developer.chrome.com/extensions/autofillPrivate#method-getAddressComponents
127  */
128 chrome.autofillPrivate.getAddressComponents = function(countryCode, callback) {};
131  * Saves the given credit card. If |card| has an empty string as its ID, it will
132  * be assigned a new one and added as a new entry.
133  * @param {CreditCardEntry} card The card entry to save.
134  * @see https://developer.chrome.com/extensions/autofillPrivate#method-saveCreditCard
135  */
136 chrome.autofillPrivate.saveCreditCard = function(card) {};
139  * Removes the entry (address or credit card) with the given ID.
140  * @param {string} guid ID of the entry to remove.
141  * @see https://developer.chrome.com/extensions/autofillPrivate#method-removeEntry
142  */
143 chrome.autofillPrivate.removeEntry = function(guid) {};
146  * Validates a newly-added phone number and invokes the callback with a list of
147  * validated numbers. Note that if the newly-added number was invalid, it will
148  * not be returned in the list of valid numbers.
149  * @param {ValidatePhoneParams} params The parameters to this function.
150  * @param {function(!Array<string>):void} callback Callback which will be called
151  *     with validated phone numbers.
152  * @see https://developer.chrome.com/extensions/autofillPrivate#method-validatePhoneNumbers
153  */
154 chrome.autofillPrivate.validatePhoneNumbers = function(params, callback) {};
157  * Clears the data associated with a wallet card which was saved locally so that
158  * the saved copy is masked (e.g., "Card ending in 1234").
159  * @param {string} guid GUID of the credit card to mask.
160  * @see https://developer.chrome.com/extensions/autofillPrivate#method-maskCreditCard
161  */
162 chrome.autofillPrivate.maskCreditCard = function(guid) {};
165  * Fired when the address list has changed, meaning that an entry has been
166  * added, removed, or changed.  |entries| The updated list of entries.
167  * @type {!ChromeEvent}
168  * @see https://developer.chrome.com/extensions/autofillPrivate#event-onAddressListChanged
169  */
170 chrome.autofillPrivate.onAddressListChanged;
173  * Fired when the credit card list has changed, meaning that an entry has been
174  * added, removed, or changed.  |entries| The updated list of entries.
175  * @type {!ChromeEvent}
176  * @see https://developer.chrome.com/extensions/autofillPrivate#event-onCreditCardListChanged
177  */
178 chrome.autofillPrivate.onCreditCardListChanged;