summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 23:14:19 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 23:14:19 +0000
commit90905e704ceda6326ffae34d5c99e73406cdc97a (patch)
tree320e2712d7ef15d86833528eb56093c74a633974 /webkit/tools
parent9dc5ce8c96cffca6c91a0c136a2ae919eb45089a (diff)
downloadchromium_src-90905e704ceda6326ffae34d5c99e73406cdc97a.zip
chromium_src-90905e704ceda6326ffae34d5c99e73406cdc97a.tar.gz
chromium_src-90905e704ceda6326ffae34d5c99e73406cdc97a.tar.bz2
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
Diffstat (limited to 'webkit/tools')
-rw-r--r--webkit/tools/test_shell/webwidget_host_gtk.cc16
1 files changed, 13 insertions, 3 deletions
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<GtkWidgetClass*>(container_class);
+ widget_class->realize = WebWidgetHostGtkRealize;
+ widget_class->size_allocate = WebWidgetHostGtkSizeAllocate;
+
+ container_class->remove = WebWidgetHostGtkRemove;
}
// Constructs the GType for the custom Gtk widget.