summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/webplugin_delegate_stub.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/plugin/webplugin_delegate_stub.cc')
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index d0fe483..c6bd74f 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -130,6 +130,8 @@ void WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginMsg_InstallMissingPlugin, OnInstallMissingPlugin)
IPC_MESSAGE_HANDLER(PluginMsg_HandleURLRequestReply,
OnHandleURLRequestReply)
+ IPC_MESSAGE_HANDLER(PluginMsg_CreateCommandBuffer,
+ OnCreateCommandBuffer)
IPC_MESSAGE_UNHANDLED_ERROR()
IPC_END_MESSAGE_MAP()
@@ -302,8 +304,9 @@ void WebPluginDelegateStub::OnUpdateGeometry(
);
}
-void WebPluginDelegateStub::OnGetPluginScriptableObject(int* route_id,
- intptr_t* npobject_ptr) {
+void WebPluginDelegateStub::OnGetPluginScriptableObject(
+ int* route_id,
+ intptr_t* npobject_ptr) {
NPObject* object = delegate_->GetPluginScriptableObject();
if (!object) {
*route_id = MSG_ROUTING_NONE;
@@ -357,6 +360,16 @@ void WebPluginDelegateStub::OnInstallMissingPlugin() {
delegate_->InstallMissingPlugin();
}
+void WebPluginDelegateStub::OnCreateCommandBuffer(int* route_id) {
+#if defined(ENABLE_GPU)
+ command_buffer_stub_.reset(new CommandBufferStub(
+ static_cast<PluginChannel*>(PluginChannelBase::GetCurrentChannel()),
+ delegate_->windowed_handle()));
+
+ *route_id = command_buffer_stub_->route_id();
+#endif
+}
+
void WebPluginDelegateStub::CreateSharedBuffer(
size_t size,
base::SharedMemory* shared_buf,