Index: chrome/browser/resources/options/options_page.js |
diff --git a/chrome/browser/resources/options/options_page.js b/chrome/browser/resources/options/options_page.js |
index 1a07cce16e85720018864c24078653e92c84d6e0..5c5efc5da5fa40a98a20cedc76a2af4467b92fd9 100644 |
--- a/chrome/browser/resources/options/options_page.js |
+++ b/chrome/browser/resources/options/options_page.js |
@@ -460,6 +460,16 @@ cr.define('options', function() { |
}; |
/** |
+ * Callback for window.onbeforeunload. Used to notify overlays that they will |
+ * be closed. |
+ */ |
+ OptionsPage.willClose = function() { |
+ var overlay = this.getVisibleOverlay_(); |
+ if (overlay && overlay.didClosePage) |
+ overlay.didClosePage(); |
+ }; |
+ |
+ /** |
* Freezes/unfreezes the scroll position of given level's page container. |
* @param {boolean} freeze Whether the page should be frozen. |
* @param {number} level The level to freeze/unfreeze. |