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

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

Issue 6973031: Options: Notify overlays that they will be closed if the options tab is closed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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
« no previous file with comments | « chrome/browser/resources/options/options.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/browser/resources/options/options.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698