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

Unified Diff: webkit/tools/test_shell/webview_host_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 | « webkit/tools/test_shell/webview_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/webview_host_gtk.cc
diff --git a/webkit/tools/test_shell/webview_host_gtk.cc b/webkit/tools/test_shell/webview_host_gtk.cc
index cd491aff868a86c6f279c08b34f13dfaa172b57d..e089052df7bc1fc24121fe8e677cd24f5370d6f8 100644
--- a/webkit/tools/test_shell/webview_host_gtk.cc
+++ b/webkit/tools/test_shell/webview_host_gtk.cc
@@ -58,11 +58,16 @@ GtkWidget* WebViewHost::MapIDToWidget(GdkNativeWindow id) {
return NULL;
}
-gboolean WebViewHost::OnPlugRemoved(GtkSocket* socket) {
- // Remove the socket's id from our list of widgets.
- GdkNativeWindow id = gtk_socket_get_id(socket);
+void WebViewHost::OnPluginWindowDestroyed(GdkNativeWindow id) {
+ GtkWidget* plugin_container = MapIDToWidget(id);
+ if (!plugin_container)
+ return;
+
native_window_to_widget_map_.erase(id);
+ gtk_widget_destroy(plugin_container);
+}
- return FALSE; // Destroy our widget.
+gboolean WebViewHost::OnPlugRemoved(GtkSocket* socket) {
+ return TRUE; // Don't destroy our widget; we manage it ourselves.
}
« no previous file with comments | « webkit/tools/test_shell/webview_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698