summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin.h
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 00:33:37 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 00:33:37 +0000
commit3b33faae96e4cf42ec6b0da5163668b1e482d821 (patch)
tree05bc5e540fdd3150cdc256d46b0602df0670c441 /webkit/glue/webplugin.h
parent5f1b0d6b9fb0b529202c63e99a67032cf1a306c9 (diff)
downloadchromium_src-3b33faae96e4cf42ec6b0da5163668b1e482d821.zip
chromium_src-3b33faae96e4cf42ec6b0da5163668b1e482d821.tar.gz
chromium_src-3b33faae96e4cf42ec6b0da5163668b1e482d821.tar.bz2
linux plugins: eliminate GtkWidget* from plugin process
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@19320 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin.h')
-rw-r--r--webkit/glue/webplugin.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/webkit/glue/webplugin.h b/webkit/glue/webplugin.h
index d6a5b75..2debf9a 100644
--- a/webkit/glue/webplugin.h
+++ b/webkit/glue/webplugin.h
@@ -25,7 +25,9 @@ struct NPObject;
// Describes the new location for a plugin window.
struct WebPluginGeometry {
- gfx::NativeView window;
+ // On Windows, this is the plugin window in the plugin process.
+ // On X11, this is the browser process's hosting window (the GtkSocket).
+ gfx::PluginWindowHandle window;
gfx::Rect window_rect;
// Clip rect (include) and cutouts (excludes), relative to
// window_rect origin.
@@ -54,11 +56,11 @@ class WebPlugin {
// windowed (i.e. handle is not NULL) or windowless (handle is NULL). This
// tells the WebPlugin to send mouse/keyboard events to the plugin delegate,
// as well as the information about the HDC for paint operations.
- virtual void SetWindow(gfx::NativeView window) = 0;
+ virtual void SetWindow(gfx::PluginWindowHandle window) = 0;
// Called by the plugin delegate to let it know that the window is being
// destroyed.
- virtual void WillDestroyWindow(gfx::NativeView window) = 0;
+ virtual void WillDestroyWindow(gfx::PluginWindowHandle window) = 0;
#if defined(OS_WIN)
// The pump_messages_event is a event handle which is valid only for
// windowless plugins and is used in NPP_HandleEvent calls to pump messages