diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-28 17:42:56 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-28 17:42:56 +0000 |
commit | bb64e11d986551e16b51f67034335ef4cc5c2a8c (patch) | |
tree | 7c0ece07e4712baa5f5ae86d9963087a68fc73f3 /webkit/glue/plugins | |
parent | 76a51ac85ab739064c2c6b224d489cfa1767ae8a (diff) | |
download | chromium_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/plugins')
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_gtk.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc index 49670fc..c20fee0 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc @@ -266,8 +266,8 @@ bool WebPluginDelegateImpl::WindowedCreatePlugin() { window_.window = reinterpret_cast<void*>(parent_); // The remainder of the code expects windowed_handle_ to exist for // windowed mode, despite not actually ever reaching through - // windowed_handle_. So let's set it to the one window handle we - // actually have available. + // windowed_handle_. It is still used as a token to represent "this + // plugin" in messages to the browser. windowed_handle_ = parent_; if (!window_.ws_info) @@ -283,9 +283,11 @@ bool WebPluginDelegateImpl::WindowedCreatePlugin() { } void WebPluginDelegateImpl::WindowedDestroyWindow() { - // We have no window to destroy; see comment in WindowedCreatePlugin - // where windowed_handle_ is set. - windowed_handle_ = 0; + if (windowed_handle_) { + plugin_->WillDestroyWindow(windowed_handle_); + + windowed_handle_ = 0; + } } bool WebPluginDelegateImpl::WindowedReposition( |