Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: webkit/tools/test_shell/test_webview_delegate_gtk.cc

Issue 150034: linux: only create browser-side plugin container after plugin requests it (Closed)
Patch Set: fix chrome build Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_webview_delegate_gtk.cc
diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
index cd21c176dd013cdd828d45e9f720cc77319a716d..10ba40f3860cf06bed05eda0d6baf1fc14a1171d 100644
--- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
@@ -7,6 +7,7 @@
#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"
@@ -91,13 +92,18 @@ 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 =
- shell_->webViewHost()->CreatePluginContainer();
+ GDK_WINDOW_XWINDOW(shell_->webViewHost()->view_handle()->window);
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);
}
@@ -232,7 +238,8 @@ void TestWebViewDelegate::DidMove(WebWidget* webwidget,
// window?), ignore the message.
if (!widget)
return;
- DCHECK(!GTK_WIDGET_NO_WINDOW(widget) && GTK_WIDGET_REALIZED(widget));
+ DCHECK(!GTK_WIDGET_NO_WINDOW(widget));
+ DCHECK(GTK_WIDGET_REALIZED(widget));
if (!move.visible) {
gtk_widget_hide(widget);
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698