diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 18:22:54 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 18:22:54 +0000 |
commit | 140c303f6227f870bb269bd6810c907c99004b55 (patch) | |
tree | ec3522f3193bc2688d7777fcd022e808a530dc49 /webkit/glue/plugins/plugin_instance.h | |
parent | 487c2873c78595f5ec78629a5ca92304b34ce317 (diff) | |
download | chromium_src-140c303f6227f870bb269bd6810c907c99004b55.zip chromium_src-140c303f6227f870bb269bd6810c907c99004b55.tar.gz chromium_src-140c303f6227f870bb269bd6810c907c99004b55.tar.bz2 |
linux plugins: eliminate GtkWidget* from plugin process
[retry with mac hopefully fixed this time]
GtkWidget* (and its wrapper, gfx::NativeView) only work within a
single process. Plugins already work with a lower-level type that
works across processes -- an X Window id. The parent of a plugin
is an HWND on windows, but it's an X Window id on X. So we
introduce a new typedef wrapping that and push it through all the
places in the code that needs it.
Since we no longer have a GtkSocket in the WebPluginDelegateImpl,
we need to do a bit more work in the WebViewDelegate (aka the
browser process in the multiproc world).
We also need the plugin host (the browser) to track the
GtkSockets that are hosting the plugin, as well as destroy them
when necessary. To do this we require the plugin owner to
grab the plug-removed signal rather than putting its handler in
GtkPluginContainer; this is the way it worked before I'd refactored
into GtkPluginContainer so it shouldn't be so bad.
This change still only works in test_shell, but the refactoring
should translate to the multiprocess case pretty easily.
Review URL: http://codereview.chromium.org/146009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19387 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_instance.h')
-rw-r--r-- | webkit/glue/plugins/plugin_instance.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/webkit/glue/plugins/plugin_instance.h b/webkit/glue/plugins/plugin_instance.h index e73d49f..ba8824f8 100644 --- a/webkit/glue/plugins/plugin_instance.h +++ b/webkit/glue/plugins/plugin_instance.h @@ -70,8 +70,10 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> { NPP npp() { return npp_; } // Get/Set for the instance's window handle. - gfx::NativeView window_handle() { return window_handle_; } - void set_window_handle(gfx::NativeView value) { window_handle_ = value; } + gfx::PluginWindowHandle window_handle() const { return window_handle_; } + void set_window_handle(gfx::PluginWindowHandle value) { + window_handle_ = value; + } // Get/Set whether this instance is in Windowless mode. // Default is false. @@ -223,7 +225,7 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> { scoped_refptr<PluginHost> host_; NPPluginFuncs* npp_functions_; std::vector<scoped_refptr<PluginStream> > open_streams_; - gfx::NativeView window_handle_; + gfx::PluginWindowHandle window_handle_; bool windowless_; bool transparent_; WebPlugin* webplugin_; |