summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/webplugin_delegate_proxy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/webplugin_delegate_proxy.cc')
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc41
1 files changed, 36 insertions, 5 deletions
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index 178f07f..a743a3f 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -4,12 +4,12 @@
#include "chrome/renderer/webplugin_delegate_proxy.h"
-#include <algorithm>
-
#if defined(OS_LINUX)
#include <gtk/gtk.h>
#endif
+#include <algorithm>
+
#include "app/gfx/blit.h"
#include "app/gfx/canvas.h"
#include "app/gfx/native_widget_types.h"
@@ -398,9 +398,16 @@ void WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) {
#if defined(OS_MACOSX)
IPC_MESSAGE_HANDLER(PluginHostMsg_UpdateGeometry_ACK,
OnUpdateGeometry_ACK)
- // Used only on 10.6 and later
+ // Used only on 10.6 and later.
IPC_MESSAGE_HANDLER(PluginHostMsg_GPUPluginSetIOSurface,
OnGPUPluginSetIOSurface)
+ // Used on 10.5 and earlier.
+ IPC_MESSAGE_HANDLER(PluginHostMsg_GPUPluginSetTransportDIB,
+ OnGPUPluginSetTransportDIB)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_AllocTransportDIB,
+ OnGPUPluginAllocTransportDIB)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_FreeTransportDIB,
+ OnGPUPluginFreeTransportDIB)
IPC_MESSAGE_HANDLER(PluginHostMsg_GPUPluginBuffersSwapped,
OnGPUPluginBuffersSwapped)
#endif
@@ -503,8 +510,7 @@ void WebPluginDelegateProxy::UpdateGeometry(const gfx::Rect& window_rect,
// scripts the plugin to start playing while it's in the middle of handling
// an update geometry message, videos don't play. See urls in bug 20260.
msg = new PluginMsg_UpdateGeometrySync(instance_id_, param);
- }
- else
+ } else // NO_LINT
#endif
{
msg = new PluginMsg_UpdateGeometry(instance_id_, param);
@@ -1325,6 +1331,31 @@ void WebPluginDelegateProxy::OnGPUPluginSetIOSurface(
io_surface_identifier);
}
+void WebPluginDelegateProxy::OnGPUPluginSetTransportDIB(
+ gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ TransportDIB::Handle transport_dib) {
+ if (render_view_)
+ render_view_->GPUPluginSetTransportDIB(window, width, height,
+ transport_dib);
+}
+
+void WebPluginDelegateProxy::OnGPUPluginAllocTransportDIB(
+ size_t size,
+ TransportDIB::Handle* dib_handle) {
+ if (render_view_)
+ *dib_handle = render_view_->GPUPluginAllocTransportDIB(size);
+ else
+ *dib_handle = TransportDIB::DefaultHandleValue();
+}
+
+void WebPluginDelegateProxy::OnGPUPluginFreeTransportDIB(
+ TransportDIB::Id dib_id) {
+ if (render_view_)
+ render_view_->GPUPluginFreeTransportDIB(dib_id);
+}
+
void WebPluginDelegateProxy::OnGPUPluginBuffersSwapped(
gfx::PluginWindowHandle window) {
if (render_view_)