summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/plugin/webplugin_proxy.h5
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_gtk.cc10
-rw-r--r--webkit/glue/webplugin.h7
-rw-r--r--webkit/glue/webplugin_impl.cc11
-rw-r--r--webkit/glue/webplugin_impl.h5
-rw-r--r--webkit/glue/webview_delegate.h4
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h1
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_gtk.cc13
8 files changed, 10 insertions, 46 deletions
diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h
index c7bbe91..e143297 100644
--- a/chrome/plugin/webplugin_proxy.h
+++ b/chrome/plugin/webplugin_proxy.h
@@ -37,11 +37,6 @@ class WebPluginProxy : public WebPlugin {
~WebPluginProxy();
// WebPlugin overrides
-#if defined(OS_LINUX)
- gfx::PluginWindowHandle CreatePluginContainer() {
- return 0; // Temporary empty stub while we restructure test_shell.
- }
-#endif
void SetWindow(gfx::PluginWindowHandle window);
void WillDestroyWindow(gfx::PluginWindowHandle window);
#if defined(OS_WIN)
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
index 9f9838b..c20fee0 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
@@ -263,10 +263,12 @@ bool WebPluginDelegateImpl::WindowedCreatePlugin() {
return false;
}
- // Xembed plugins need a window created for them browser-side.
- // Do that now.
- windowed_handle_ = plugin_->CreatePluginContainer();
- window_.window = reinterpret_cast<void*>(windowed_handle_);
+ 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_;
if (!window_.ws_info)
window_.ws_info = new NPSetWindowCallbackStruct;
diff --git a/webkit/glue/webplugin.h b/webkit/glue/webplugin.h
index 07d2470..2debf9a 100644
--- a/webkit/glue/webplugin.h
+++ b/webkit/glue/webplugin.h
@@ -52,13 +52,6 @@ class WebPlugin {
WebPlugin() { }
virtual ~WebPlugin() { }
-#if defined(OS_LINUX)
- // Called by the plugin delegate to request a container for a new
- // windowed plugin. This handle will later get destroyed with
- // WillDestroyWindow.
- virtual gfx::PluginWindowHandle CreatePluginContainer() = 0;
-#endif
-
// Called by the plugin delegate to let the WebPlugin know if the plugin is
// 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,
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index e554255..35ea7b2 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -388,17 +388,6 @@ WebPluginImpl::WebPluginImpl(WebCore::HTMLPlugInElement* element,
WebPluginImpl::~WebPluginImpl() {
}
-#if defined(OS_LINUX)
-gfx::PluginWindowHandle WebPluginImpl::CreatePluginContainer() {
- WebCore::Frame* frame = element_->document()->frame();
- WebFrameImpl* webframe = WebFrameImpl::FromFrame(frame);
- WebViewImpl* webview = webframe->GetWebViewImpl();
- if (!webview->delegate())
- return 0;
- return webview->delegate()->CreatePluginContainer();
-}
-#endif
-
void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) {
if (window) {
DCHECK(!windowless_); // Make sure not called twice.
diff --git a/webkit/glue/webplugin_impl.h b/webkit/glue/webplugin_impl.h
index b81e8a9..7d51f39 100644
--- a/webkit/glue/webplugin_impl.h
+++ b/webkit/glue/webplugin_impl.h
@@ -113,7 +113,7 @@ class WebPluginContainer : public WebCore::Widget {
};
// This is the WebKit side of the plugin implementation that forwards calls,
-// after changing out of WebCore types, to a delegate. The delegate may
+// after changing out of WebCore types, to a delegate. The delegate will
// be in a different process.
class WebPluginImpl : public WebPlugin,
public WebKit::WebURLLoaderClient {
@@ -148,9 +148,6 @@ class WebPluginImpl : public WebPlugin,
int arg_count, char** arg_names, char** arg_values);
// WebPlugin implementation:
-#if defined(OS_LINUX)
- gfx::PluginWindowHandle CreatePluginContainer();
-#endif
void SetWindow(gfx::PluginWindowHandle window);
void WillDestroyWindow(gfx::PluginWindowHandle window);
#if defined(OS_WIN)
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h
index 6106d1d..7fe792f 100644
--- a/webkit/glue/webview_delegate.h
+++ b/webkit/glue/webview_delegate.h
@@ -133,10 +133,6 @@ class WebViewDelegate : virtual public WebWidgetDelegate {
return NULL;
}
- // Called when a windowed plugin is initializing, to request a container
- // for the plugin. Only used on Linux.
- virtual gfx::PluginWindowHandle CreatePluginContainer() { return 0; }
-
// Called when a windowed plugin is closing.
// Lets the view delegate shut down anything it is using to wrap the plugin.
virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle) { }
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index 221943e..1b5a99e 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -89,7 +89,6 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>,
const std::string& clsid,
std::string* actual_mime_type);
#if defined(OS_LINUX)
- virtual gfx::PluginWindowHandle CreatePluginContainer();
virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle);
#endif
virtual WebKit::WebMediaPlayer* CreateWebMediaPlayer(
diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
index 10ba40f..cd21c17 100644
--- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
@@ -7,7 +7,6 @@
#include "webkit/tools/test_shell/test_webview_delegate.h"
#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
#include "base/gfx/gtk_util.h"
#include "base/gfx/point.h"
@@ -92,18 +91,13 @@ WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
const std::string& mtype =
(actual_mime_type && !actual_mime_type->empty()) ? *actual_mime_type
: mime_type;
- // TODO(evanm): we probably shouldn't be doing this mapping to X ids at
- // this level.
+
GdkNativeWindow plugin_parent =
- GDK_WINDOW_XWINDOW(shell_->webViewHost()->view_handle()->window);
+ shell_->webViewHost()->CreatePluginContainer();
return WebPluginDelegateImpl::Create(info.path, mtype, plugin_parent);
}
-gfx::PluginWindowHandle TestWebViewDelegate::CreatePluginContainer() {
- return shell_->webViewHost()->CreatePluginContainer();
-}
-
void TestWebViewDelegate::WillDestroyPluginWindow(unsigned long id) {
shell_->webViewHost()->OnPluginWindowDestroyed(id);
}
@@ -238,8 +232,7 @@ void TestWebViewDelegate::DidMove(WebWidget* webwidget,
// window?), ignore the message.
if (!widget)
return;
- DCHECK(!GTK_WIDGET_NO_WINDOW(widget));
- DCHECK(GTK_WIDGET_REALIZED(widget));
+ DCHECK(!GTK_WIDGET_NO_WINDOW(widget) && GTK_WIDGET_REALIZED(widget));
if (!move.visible) {
gtk_widget_hide(widget);