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

Unified Diff: chrome/renderer/webplugin_delegate_proxy.cc

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 | « chrome/renderer/webplugin_delegate_proxy.h ('k') | webkit/glue/plugins/gtk_plugin_container_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/webplugin_delegate_proxy.cc
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index b98b728443d91d6edeac7f824b965f95e2370237..068a7a1b4ddac90a1678db0d5523a70ac2bac5ed 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -331,6 +331,12 @@ void WebPluginDelegateProxy::InstallMissingPlugin() {
void WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) {
IPC_BEGIN_MESSAGE_MAP(WebPluginDelegateProxy, msg)
IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindow, OnSetWindow)
+#if defined(OS_LINUX)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_CreatePluginContainer,
+ OnCreatePluginContainer)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_DestroyPluginContainer,
+ OnDestroyPluginContainer)
+#endif
#if defined(OS_WIN)
IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindowlessPumpEvent,
OnSetWindowlessPumpEvent)
@@ -634,17 +640,26 @@ int WebPluginDelegateProxy::GetProcessId() {
return channel_host_->peer_pid();
}
-void WebPluginDelegateProxy::OnSetWindow(gfx::NativeViewId window_id) {
-#if defined(OS_WIN)
- gfx::NativeView window = gfx::NativeViewFromId(window_id);
- windowless_ = window == NULL;
+void WebPluginDelegateProxy::OnSetWindow(gfx::PluginWindowHandle window) {
+ windowless_ = window == static_cast<gfx::PluginWindowHandle>(0);
if (plugin_)
plugin_->SetWindow(window);
-#else
- NOTIMPLEMENTED();
-#endif
}
+#if defined(OS_LINUX)
+void WebPluginDelegateProxy::OnCreatePluginContainer(
+ gfx::PluginWindowHandle* container) {
+ RenderThread::current()->Send(new ViewHostMsg_CreatePluginContainer(
+ render_view_->routing_id(), container));
+}
+
+void WebPluginDelegateProxy::OnDestroyPluginContainer(
+ gfx::PluginWindowHandle container) {
+ RenderThread::current()->Send(new ViewHostMsg_DestroyPluginContainer(
+ render_view_->routing_id(), container));
+}
+#endif
+
#if defined(OS_WIN)
void WebPluginDelegateProxy::OnSetWindowlessPumpEvent(
HANDLE modal_loop_pump_messages_event) {
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.h ('k') | webkit/glue/plugins/gtk_plugin_container_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698