From 90905e704ceda6326ffae34d5c99e73406cdc97a Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Thu, 5 Feb 2009 23:14:19 +0000 Subject: The final bits needed so we can navigate away from Flash pages without crashing. Also fixes the plugin positioning. We needed to catch plug-removed and return TRUE, as well as implement a bit more of the GtkContainer API. Also, Flash seems to crash no matter what when I call the SetWindow with a NULL window, so don't do that for now. (It can be revisited once that code is remerged.) Review URL: http://codereview.chromium.org/22003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9274 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/tools/test_shell/webwidget_host_gtk.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'webkit/tools') diff --git a/webkit/tools/test_shell/webwidget_host_gtk.cc b/webkit/tools/test_shell/webwidget_host_gtk.cc index 5ca52e6..fdd9df2 100644 --- a/webkit/tools/test_shell/webwidget_host_gtk.cc +++ b/webkit/tools/test_shell/webwidget_host_gtk.cc @@ -83,10 +83,20 @@ void WebWidgetHostGtkSizeAllocate(GtkWidget* widget, WebWidgetHostGtkSendConfigure(widget); } +// Implementation of "remove" for our GtkContainer subclass. +// This called when plugins shut down. We can just ignore it. +void WebWidgetHostGtkRemove(GtkContainer* container, GtkWidget* widget) { + // Do nothing. +} + // Implementation of the class init function for WebWidgetHostGtk. -void WebWidgetHostGtkClassInit(GtkWidgetClass* klass) { - klass->realize = WebWidgetHostGtkRealize; - klass->size_allocate = WebWidgetHostGtkSizeAllocate; +void WebWidgetHostGtkClassInit(GtkContainerClass* container_class) { + GtkWidgetClass* widget_class = + reinterpret_cast(container_class); + widget_class->realize = WebWidgetHostGtkRealize; + widget_class->size_allocate = WebWidgetHostGtkSizeAllocate; + + container_class->remove = WebWidgetHostGtkRemove; } // Constructs the GType for the custom Gtk widget. -- cgit v1.1