summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webview.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 23:20:35 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 23:20:35 +0000
commite6fae1bb7b0da3005d0d5f3d5106e36fba1690c5 (patch)
treeba7d5d8bf7357f66d41292d347e1e4ff0500f5b0 /webkit/glue/webview.h
parent26865477e028ccee54a243467693e7cc25bf6783 (diff)
downloadchromium_src-e6fae1bb7b0da3005d0d5f3d5106e36fba1690c5.zip
chromium_src-e6fae1bb7b0da3005d0d5f3d5106e36fba1690c5.tar.gz
chromium_src-e6fae1bb7b0da3005d0d5f3d5106e36fba1690c5.tar.bz2
Move ClosePage method to WebView.
Since it is about closing a page, WebView is a better home for it. R=dglazkov BUG=10034 TEST=none Review URL: http://codereview.chromium.org/164105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webview.h')
-rw-r--r--webkit/glue/webview.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h
index dcc3643..1ada9cf 100644
--- a/webkit/glue/webview.h
+++ b/webkit/glue/webview.h
@@ -82,6 +82,15 @@ class WebView : public WebKit::WebWidget {
// onbeforeunload event handlers.
virtual bool ShouldClose() = 0;
+ // Tells the current page to close, running the onunload handler.
+ // TODO(creis): We'd rather use WebWidget::Close(), but that sets its
+ // delegate_ to NULL, preventing any JavaScript dialogs in the onunload
+ // handler from appearing. This lets us shortcut that for now, but we should
+ // refactor close messages so that this isn't necessary.
+ // TODO(darin): This comment is out-of-date, and we should be able to use
+ // WebWidget::Close now.
+ virtual void ClosePage() = 0;
+
//
// @method mainFrame
// @abstract Return the top level frame.