summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-29 23:57:54 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-29 23:57:54 +0000
commit9fa82bb8872a34275f3e0832f33339a4d07fa33b (patch)
treec5bafa8a9d5f0cf931834ad750f909b17e4c9534 /webkit/glue/plugins
parent893a5ccce13082aa85686ad142c0d8be0fb5cd70 (diff)
downloadchromium_src-9fa82bb8872a34275f3e0832f33339a4d07fa33b.zip
chromium_src-9fa82bb8872a34275f3e0832f33339a4d07fa33b.tar.gz
chromium_src-9fa82bb8872a34275f3e0832f33339a4d07fa33b.tar.bz2
linux: only create browser-side plugin container after plugin requests it
On Windows, windowed plugins are parented in a two-stage process: initially, the plugin is parented to the render view, then later it's reparented to a special per-plugin window. On Linux, plugin embedding always needs a special per-plugin window before it can be initialized. So there's no way to do the two-stage initialization process, and we only want to construct the browser-side plugin container for windowed plugins after the plugin requests it. Plumbing this through the WebPlugin interface will also allow us to side-route this request for window creation out to the browser process in the multi-process case. BUG=15421 TEST=plugins still work in test_shell Review URL: http://codereview.chromium.org/150034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19560 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_gtk.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
index c20fee0..9f9838b 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
@@ -263,12 +263,10 @@ bool WebPluginDelegateImpl::WindowedCreatePlugin() {
return false;
}
- 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_. It is still used as a token to represent "this
- // plugin" in messages to the browser.
- windowed_handle_ = parent_;
+ // Xembed plugins need a window created for them browser-side.
+ // Do that now.
+ windowed_handle_ = plugin_->CreatePluginContainer();
+ window_.window = reinterpret_cast<void*>(windowed_handle_);
if (!window_.ws_info)
window_.ws_info = new NPSetWindowCallbackStruct;