Index: chrome/browser/resources/options/alert_overlay.js |
diff --git a/chrome/browser/resources/options/alert_overlay.js b/chrome/browser/resources/options/alert_overlay.js |
index aab11765e671258cfa6e6977e7087ed7ab76f7e4..aef682b5751454ac3cfd0b29e3f760e08b8021ac 100644 |
--- a/chrome/browser/resources/options/alert_overlay.js |
+++ b/chrome/browser/resources/options/alert_overlay.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; |
/** |
* AlertOverlay class |
@@ -11,14 +12,17 @@ cr.define('options', function() { |
* @class |
*/ |
function AlertOverlay() { |
- OptionsPage.call(this, 'alertOverlay', '', 'alertOverlay'); |
+ // AlertOverlay is special in that it is not tied to one page or overlay. |
+ // Set the nesting level arbitrarily high so as to always be recognized as |
+ // the top-most visible page. |
+ Page.call(this, 'alertOverlay', '', 'alertOverlay', 99); |
} |
cr.addSingletonGetter(AlertOverlay); |
AlertOverlay.prototype = { |
- // Inherit AlertOverlay from OptionsPage. |
- __proto__: OptionsPage.prototype, |
+ // Inherit AlertOverlay from Page. |
+ __proto__: Page.prototype, |
/** |
* Whether the page can be shown. Used to make sure the page is only |
@@ -31,8 +35,7 @@ cr.define('options', function() { |
* Initialize the page. |
*/ |
initializePage: function() { |
- // Call base class implementation to start preference initialization. |
- OptionsPage.prototype.initializePage.call(this); |
+ Page.prototype.initializePage.call(this); |
var self = this; |
$('alertOverlayOk').onclick = function(event) { |
@@ -44,21 +47,13 @@ cr.define('options', function() { |
}; |
}, |
- /** @override */ |
- get nestingLevel() { |
- // AlertOverlay is special in that it is not tied to one page or overlay. |
- // Set the nesting level arbitrarily high so as to always be recognized as |
- // the top-most visible page. |
- return 99; |
- }, |
- |
/** |
* Handle the 'ok' button. Clear the overlay and call the ok callback if |
* available. |
* @private |
*/ |
handleOK_: function() { |
- OptionsPage.closeOverlay(); |
+ PageManager.closeOverlay(); |
if (this.okCallback != undefined) { |
Dan Beam
2014/07/30 01:00:01
opt nit: no curlies, no comparison to undefined
michaelpg
2014/07/30 21:42:19
would rather not touch this, the CL is big enough
|
this.okCallback.call(); |
} |
@@ -70,7 +65,7 @@ cr.define('options', function() { |
* @private |
*/ |
handleCancel_: function() { |
- OptionsPage.closeOverlay(); |
+ PageManager.closeOverlay(); |
if (this.cancelCallback != undefined) { |
this.cancelCallback.call(); |
} |
@@ -142,7 +137,7 @@ cr.define('options', function() { |
// Intentionally don't show the URL in the location bar as we don't want |
// people trying to navigate here by hand. |
- OptionsPage.showPageByName('alertOverlay', false); |
+ PageManager.showPageByName('alertOverlay', false); |
}; |
// Export |