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

Unified Diff: webkit/tools/test_shell/webview_host.h

Issue 146078: linux: OOP windowed plugins (Closed)
Patch Set: new version Created 11 years, 5 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_gtk.cc ('k') | webkit/tools/test_shell/webview_host_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/webview_host.h
diff --git a/webkit/tools/test_shell/webview_host.h b/webkit/tools/test_shell/webview_host.h
index 9c7c489bd7355e19643955551526d5d03c038d1e..d34dfebe017f886d3cf868395d87cdc3d6636354 100644
--- a/webkit/tools/test_shell/webview_host.h
+++ b/webkit/tools/test_shell/webview_host.h
@@ -11,15 +11,14 @@
#include "base/gfx/native_widget_types.h"
#include "base/gfx/rect.h"
#include "webkit/tools/test_shell/webwidget_host.h"
+#if defined(OS_LINUX)
+#include "webkit/glue/plugins/gtk_plugin_container_host.h"
+#endif
struct WebPreferences;
class WebView;
class WebViewDelegate;
-#if defined(OS_LINUX)
-typedef struct _GtkSocket GtkSocket;
-#endif
-
// This class is a simple NativeView-based host for a WebView
class WebViewHost : public WebWidgetHost {
public:
@@ -37,15 +36,16 @@ class WebViewHost : public WebWidgetHost {
// embedders to use.
GdkNativeWindow CreatePluginContainer();
- // Map a GdkNativeWindow returned by CreatePluginContainer() back to
- // the GtkWidget hosting it. Used when we get a message back from the
- // renderer indicating a plugin needs to move.
- GtkWidget* MapIDToWidget(GdkNativeWindow id);
-
// Called when a plugin has been destroyed. Lets us clean up our side.
void OnPluginWindowDestroyed(GdkNativeWindow id);
#endif
+#if defined(OS_LINUX)
+ GtkPluginContainerHost& plugin_container_host() {
+ return plugin_container_host_;
+ }
+#endif
+
protected:
#if defined(OS_WIN)
virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam) {
@@ -54,16 +54,8 @@ class WebViewHost : public WebWidgetHost {
#endif
#if defined(OS_LINUX)
- // A map used for MapIDToWidget() above.
- typedef std::map<GdkNativeWindow, GtkWidget*> NativeWindowToWidgetMap;
- NativeWindowToWidgetMap native_window_to_widget_map_;
-
- // Callback for when one of our plugins goes away.
- static gboolean OnPlugRemovedThunk(GtkSocket* socket,
- WebViewHost* web_view_host) {
- return web_view_host->OnPlugRemoved(socket);
- }
- gboolean OnPlugRemoved(GtkSocket* socket);
+ // Helper class that creates and moves plugin containers.
+ GtkPluginContainerHost plugin_container_host_;
#endif
};
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate_gtk.cc ('k') | webkit/tools/test_shell/webview_host_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698