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

Unified Diff: chrome/browser/resources/options/autofill_options.js

Issue 410293004: Split OptionsPage into Page and PageManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed feedback Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/autofill_options.js
diff --git a/chrome/browser/resources/options/autofill_options.js b/chrome/browser/resources/options/autofill_options.js
index bc4c90cf7036f97ea56085d23c1f6fab26f6170e..70dd71aba709c1fb4bde1b5c00cd5a2641be4c84 100644
--- a/chrome/browser/resources/options/autofill_options.js
+++ b/chrome/browser/resources/options/autofill_options.js
@@ -3,7 +3,8 @@
// found in the LICENSE file.
cr.define('options', function() {
- var OptionsPage = options.OptionsPage;
+ var Page = cr.ui.pageManager.Page;
+ var PageManager = cr.ui.pageManager.PageManager;
var ArrayDataModel = cr.ui.ArrayDataModel;
/////////////////////////////////////////////////////////////////////////////
@@ -14,16 +15,16 @@ cr.define('options', function() {
* @constructor
*/
function AutofillOptions() {
- OptionsPage.call(this,
- 'autofill',
- loadTimeData.getString('autofillOptionsPageTabTitle'),
- 'autofill-options');
+ Page.call(this,
+ 'autofill',
+ loadTimeData.getString('autofillOptionsPageTabTitle'),
+ 'autofill-options');
}
cr.addSingletonGetter(AutofillOptions);
AutofillOptions.prototype = {
- __proto__: OptionsPage.prototype,
+ __proto__: Page.prototype,
/**
* The address list.
@@ -40,7 +41,7 @@ cr.define('options', function() {
creditCardList_: null,
initializePage: function() {
- OptionsPage.prototype.initializePage.call(this);
+ Page.prototype.initializePage.call(this);
this.createAddressList_();
this.createCreditCardList_();
@@ -53,7 +54,7 @@ cr.define('options', function() {
self.showAddCreditCardOverlay_();
};
$('autofill-options-confirm').onclick = function(event) {
- OptionsPage.closeOverlay();
+ PageManager.closeOverlay();
};
<if expr="is_macosx">
$('autofill-use-mac-address-book-checkbox').onchange = function(event) {
@@ -102,7 +103,7 @@ cr.define('options', function() {
showAddAddressOverlay_: function() {
var title = loadTimeData.getString('addAddressTitle');
AutofillEditAddressOverlay.setTitle(title);
- OptionsPage.navigateToPage('autofillEditAddress');
+ PageManager.showPageByName('autofillEditAddress');
},
/**
@@ -113,7 +114,7 @@ cr.define('options', function() {
showAddCreditCardOverlay_: function() {
var title = loadTimeData.getString('addCreditCardTitle');
AutofillEditCreditCardOverlay.setTitle(title);
- OptionsPage.navigateToPage('autofillEditCreditCard');
+ PageManager.showPageByName('autofillEditCreditCard');
},
/**
@@ -175,7 +176,7 @@ cr.define('options', function() {
var title = loadTimeData.getString('editAddressTitle');
AutofillEditAddressOverlay.setTitle(title);
AutofillEditAddressOverlay.loadAddress(address);
- OptionsPage.navigateToPage('autofillEditAddress');
+ PageManager.showPageByName('autofillEditAddress');
},
/**
@@ -188,7 +189,7 @@ cr.define('options', function() {
var title = loadTimeData.getString('editCreditCardTitle');
AutofillEditCreditCardOverlay.setTitle(title);
AutofillEditCreditCardOverlay.loadCreditCard(creditCard);
- OptionsPage.navigateToPage('autofillEditCreditCard');
+ PageManager.showPageByName('autofillEditCreditCard');
},
};

Powered by Google App Engine
This is Rietveld 408576698