summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/chrome_client_impl.cc12
-rw-r--r--webkit/glue/chrome_client_impl.h3
-rw-r--r--webkit/glue/webframe.h3
-rw-r--r--webkit/glue/webframe_impl.cc8
-rw-r--r--webkit/glue/webframe_impl.h1
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc7
-rw-r--r--webkit/glue/webframeloaderclient_impl.h2
-rw-r--r--webkit/glue/webview_delegate.h6
8 files changed, 19 insertions, 23 deletions
diff --git a/webkit/glue/chrome_client_impl.cc b/webkit/glue/chrome_client_impl.cc
index 4142548..4fe6e60 100644
--- a/webkit/glue/chrome_client_impl.cc
+++ b/webkit/glue/chrome_client_impl.cc
@@ -468,3 +468,15 @@ void ChromeClientImpl::SetCursor(const WebCursor& cursor) {
if (d)
d->SetCursor(webview_, cursor);
}
+
+void ChromeClientImpl::enableSuddenTermination() {
+ WebViewDelegate* d = webview_->delegate();
+ if (d)
+ d->EnableSuddenTermination();
+}
+
+void ChromeClientImpl::disableSuddenTermination() {
+ WebViewDelegate* d = webview_->delegate();
+ if (d)
+ d->DisableSuddenTermination();
+}
diff --git a/webkit/glue/chrome_client_impl.h b/webkit/glue/chrome_client_impl.h
index c8951ee..b985103 100644
--- a/webkit/glue/chrome_client_impl.h
+++ b/webkit/glue/chrome_client_impl.h
@@ -120,6 +120,9 @@ public:
void SetCursor(const WebCursor& cursor);
+ virtual void enableSuddenTermination();
+ virtual void disableSuddenTermination();
+
private:
WebViewImpl* webview_; // weak pointer
bool toolbars_visible_;
diff --git a/webkit/glue/webframe.h b/webkit/glue/webframe.h
index 9484d3d..0557e35 100644
--- a/webkit/glue/webframe.h
+++ b/webkit/glue/webframe.h
@@ -352,9 +352,6 @@ class WebFrame : public base::RefCounted<WebFrame> {
// Prints one page. |page| is 0-based.
virtual bool SpoolPage(int page, gfx::PlatformCanvas* canvas) = 0;
- // Does this frame have an onunload or unbeforeunload event listener?
- virtual bool HasUnloadListener() = 0;
-
// Is this frame reloading with allowing stale data? This will be true when
// the encoding of the page is changed and it needs to be re-interpreted,
// but no additional loads should occur.
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index b749df7..5f1df1d 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -1845,14 +1845,6 @@ bool WebFrameImpl::SpoolPage(int page, gfx::PlatformCanvas* canvas) {
return true;
}
-bool WebFrameImpl::HasUnloadListener() {
- if (frame() && frame()->document()) {
- Document* doc = frame()->document();
- return doc->hasUnloadEventListener();
- }
- return false;
-}
-
bool WebFrameImpl::IsReloadAllowingStaleData() const {
FrameLoader* loader = frame() ? frame()->loader() : NULL;
if (loader) {
diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h
index 14756f9..af92cd2 100644
--- a/webkit/glue/webframe_impl.h
+++ b/webkit/glue/webframe_impl.h
@@ -267,7 +267,6 @@ class WebFrameImpl : public WebFrame {
// Returns true if the frame CSS is in "printing" mode.
bool printing() const { return printing_; }
- virtual bool HasUnloadListener();
virtual bool IsReloadAllowingStaleData() const;
protected:
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index f7ab5cc..c35cf9d 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -107,13 +107,6 @@ void WebFrameLoaderClient::didPerformFirstNavigation() const {
void WebFrameLoaderClient::registerForIconNotification(bool listen){
}
-void WebFrameLoaderClient::unloadListenerChanged() {
- WebViewImpl* webview = webframe_->webview_impl();
- WebViewDelegate* d = webview->delegate();
- if (d)
- d->OnUnloadListenerChanged(webview, webframe_);
-}
-
bool WebFrameLoaderClient::hasWebView() const {
return webframe_->webview_impl() != NULL;
}
diff --git a/webkit/glue/webframeloaderclient_impl.h b/webkit/glue/webframeloaderclient_impl.h
index b14450d..5459f93 100644
--- a/webkit/glue/webframeloaderclient_impl.h
+++ b/webkit/glue/webframeloaderclient_impl.h
@@ -187,8 +187,6 @@ class WebFrameLoaderClient : public WebCore::FrameLoaderClient {
virtual void registerForIconNotification(bool listen = true);
- virtual void unloadListenerChanged();
-
// Callback function for download of alternate 404 pages. If the server is
// down or we take more than 1s to download the page, html will be an empty
// string.
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h
index 1ce50c5..dd6ba52 100644
--- a/webkit/glue/webview_delegate.h
+++ b/webkit/glue/webview_delegate.h
@@ -454,8 +454,10 @@ class WebViewDelegate : virtual public WebWidgetDelegate {
const AutofillForm& form) {
}
- //
- virtual void OnUnloadListenerChanged(WebView* webview, WebFrame* webframe) {
+ virtual void EnableSuddenTermination() {
+ }
+
+ virtual void DisableSuddenTermination() {
}
// Queries the browser for suggestions to be shown for the form text field