summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-28 17:42:56 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-28 17:42:56 +0000
commitbb64e11d986551e16b51f67034335ef4cc5c2a8c (patch)
tree7c0ece07e4712baa5f5ae86d9963087a68fc73f3 /webkit/glue/webplugin_impl.cc
parent76a51ac85ab739064c2c6b224d489cfa1767ae8a (diff)
downloadchromium_src-bb64e11d986551e16b51f67034335ef4cc5c2a8c.zip
chromium_src-bb64e11d986551e16b51f67034335ef4cc5c2a8c.tar.gz
chromium_src-bb64e11d986551e16b51f67034335ef4cc5c2a8c.tar.bz2
linux: cleanup browser-side GtkSockets when plugins are destroyed
WillDestroyWindow is already plumbed over to the browser process in the multiproc case; we want to plumb it to our RenderView delegate so we can do similar cleanup in test_shell. BUG=15423 Review URL: http://codereview.chromium.org/147251 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.cc')
-rw-r--r--webkit/glue/webplugin_impl.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 69f6259..35ea7b2 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -398,6 +398,15 @@ void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) {
}
}
+void WebPluginImpl::WillDestroyWindow(gfx::PluginWindowHandle window) {
+ WebCore::Frame* frame = element_->document()->frame();
+ WebFrameImpl* webframe = WebFrameImpl::FromFrame(frame);
+ WebViewImpl* webview = webframe->GetWebViewImpl();
+ if (!webview->delegate())
+ return;
+ webview->delegate()->WillDestroyPluginWindow(window);
+}
+
bool WebPluginImpl::CompleteURL(const std::string& url_in,
std::string* url_out) {
if (!frame() || !frame()->document()) {