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

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

Issue 6513006: Pass DictionaryValues directly to Autofill WebUI handlers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 OptionsPage = options.OptionsPage; 6 const OptionsPage = options.OptionsPage;
7 const ArrayDataModel = cr.ui.ArrayDataModel; 7 const ArrayDataModel = cr.ui.ArrayDataModel;
8 8
9 ///////////////////////////////////////////////////////////////////////////// 9 /////////////////////////////////////////////////////////////////////////////
10 // AutoFillOptions class: 10 // AutoFillOptions class:
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 /** 165 /**
166 * Shows the 'Edit address' overlay, using the data in |address| to fill the 166 * Shows the 'Edit address' overlay, using the data in |address| to fill the
167 * input fields. |address| is a list with one item, an associative array 167 * input fields. |address| is a list with one item, an associative array
168 * that contains the address data. 168 * that contains the address data.
169 * @private 169 * @private
170 */ 170 */
171 showEditAddressOverlay_: function(address) { 171 showEditAddressOverlay_: function(address) {
172 var title = localStrings.getString('editAddressTitle'); 172 var title = localStrings.getString('editAddressTitle');
173 AutoFillEditAddressOverlay.setTitle(title); 173 AutoFillEditAddressOverlay.setTitle(title);
174 AutoFillEditAddressOverlay.loadAddress(address[0]); 174 AutoFillEditAddressOverlay.loadAddress(address);
175 OptionsPage.navigateToPage('autoFillEditAddressOverlay'); 175 OptionsPage.navigateToPage('autoFillEditAddressOverlay');
176 }, 176 },
177 177
178 /** 178 /**
179 * Shows the 'Edit credit card' overlay, using the data in |credit_card| to 179 * Shows the 'Edit credit card' overlay, using the data in |credit_card| to
180 * fill the input fields. |address| is a list with one item, an associative 180 * fill the input fields. |address| is a list with one item, an associative
181 * array that contains the credit card data. 181 * array that contains the credit card data.
182 * @private 182 * @private
183 */ 183 */
184 showEditCreditCardOverlay_: function(creditCard) { 184 showEditCreditCardOverlay_: function(creditCard) {
185 var title = localStrings.getString('editCreditCardTitle'); 185 var title = localStrings.getString('editCreditCardTitle');
186 AutoFillEditCreditCardOverlay.setTitle(title); 186 AutoFillEditCreditCardOverlay.setTitle(title);
187 AutoFillEditCreditCardOverlay.loadCreditCard(creditCard[0]); 187 AutoFillEditCreditCardOverlay.loadCreditCard(creditCard);
188 OptionsPage.navigateToPage('autoFillEditCreditCardOverlay'); 188 OptionsPage.navigateToPage('autoFillEditCreditCardOverlay');
189 }, 189 },
190 }; 190 };
191 191
192 AutoFillOptions.setAddressList = function(entries) { 192 AutoFillOptions.setAddressList = function(entries) {
193 AutoFillOptions.getInstance().setAddressList_(entries); 193 AutoFillOptions.getInstance().setAddressList_(entries);
194 }; 194 };
195 195
196 AutoFillOptions.setCreditCardList = function(entries) { 196 AutoFillOptions.setCreditCardList = function(entries) {
197 AutoFillOptions.getInstance().setCreditCardList_(entries); 197 AutoFillOptions.getInstance().setCreditCardList_(entries);
(...skipping 23 matching lines...) Expand all
221 AutoFillOptions.getInstance().showEditCreditCardOverlay_(creditCard); 221 AutoFillOptions.getInstance().showEditCreditCardOverlay_(creditCard);
222 }; 222 };
223 223
224 // Export 224 // Export
225 return { 225 return {
226 AutoFillOptions: AutoFillOptions 226 AutoFillOptions: AutoFillOptions
227 }; 227 };
228 228
229 }); 229 });
230 230
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698