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

Unified Diff: webkit/glue/plugins/webplugin_delegate_impl_gtk.cc

Issue 147251: linux: cleanup browser-side GtkSockets when plugins are destroyed (Closed)
Patch Set: fixed Created 11 years, 6 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 | « no previous file | webkit/glue/webplugin_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
index 49670fc91a8178cf3bc44fdf7bdc13058a6e85e3..c20fee05aa9185623176d05ce43e6dd3b0898967 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(
« no previous file with comments | « no previous file | webkit/glue/webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698