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

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

Issue 543493002: Compile chrome://settings, part 2: reduce from 950 to 400 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@F_settings
Patch Set: rebase? rebase! 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', function() { 5 cr.define('options', function() {
6 /** @const */ var Page = cr.ui.pageManager.Page; 6 /** @const */ var Page = cr.ui.pageManager.Page;
7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager;
8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
9 9
10 /** 10 /**
11 * AutofillEditAddressOverlay class 11 * AutofillEditAddressOverlay class
12 * Encapsulated handling of the 'Add Page' overlay page. 12 * Encapsulated handling of the 'Add Page' overlay page.
13 * @class 13 * @constructor
14 * @extends {cr.ui.pageManager.Page}
14 */ 15 */
15 function AutofillEditAddressOverlay() { 16 function AutofillEditAddressOverlay() {
16 Page.call(this, 'autofillEditAddress', 17 Page.call(this, 'autofillEditAddress',
17 loadTimeData.getString('autofillEditAddressTitle'), 18 loadTimeData.getString('autofillEditAddressTitle'),
18 'autofill-edit-address-overlay'); 19 'autofill-edit-address-overlay');
19 } 20 }
20 21
21 cr.addSingletonGetter(AutofillEditAddressOverlay); 22 cr.addSingletonGetter(AutofillEditAddressOverlay);
22 23
23 AutofillEditAddressOverlay.prototype = { 24 AutofillEditAddressOverlay.prototype = {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 var fields = this.getTextFields_(); 200 var fields = this.getTextFields_();
200 for (var i = 0; i < fields.length; i++) { 201 for (var i = 0; i < fields.length; i++) {
201 address[fields[i].getAttribute('field')] = fields[i].value; 202 address[fields[i].getAttribute('field')] = fields[i].value;
202 } 203 }
203 204
204 return address; 205 return address;
205 }, 206 },
206 207
207 /** 208 /**
208 * Sets the value of each input field according to |address|. 209 * Sets the value of each input field according to |address|.
209 * @param {object} address The object with values to use. 210 * @param {Object} address The object with values to use.
210 * @private 211 * @private
211 */ 212 */
212 setInputFields_: function(address) { 213 setInputFields_: function(address) {
213 this.getCountrySwitcher_().value = address.country || ''; 214 this.getCountrySwitcher_().value = address.country || '';
214 215
215 var lists = this.getLists_(); 216 var lists = this.getLists_();
216 for (var i = 0; i < lists.length; i++) { 217 for (var i = 0; i < lists.length; i++) {
217 this.setMultiValueList_( 218 this.setMultiValueList_(
218 lists[i], address[lists[i].getAttribute('field')] || []); 219 lists[i], address[lists[i].getAttribute('field')] || []);
219 } 220 }
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 var phoneList = instance.pageDiv.querySelector('[field=phone]'); 438 var phoneList = instance.pageDiv.querySelector('[field=phone]');
438 instance.setMultiValueList_(phoneList, numbers); 439 instance.setMultiValueList_(phoneList, numbers);
439 phoneList.didReceiveValidationResult(); 440 phoneList.didReceiveValidationResult();
440 }; 441 };
441 442
442 // Export 443 // Export
443 return { 444 return {
444 AutofillEditAddressOverlay: AutofillEditAddressOverlay 445 AutofillEditAddressOverlay: AutofillEditAddressOverlay
445 }; 446 };
446 }); 447 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698