From a7a27ace0760f1ed19016822a45c6ec5300e861c Mon Sep 17 00:00:00 2001 From: "apatrick@google.com" Date: Sat, 12 Dec 2009 00:11:25 +0000 Subject: Added CommandBufferProxy, CommandBufferStub. Replaced NPAPI with IPC for synchronous messages. WebPluginDelegateImpl can instantiate a command buffer. Removed remaining dependencies on NPAPI. TEST=none BUG=none Review URL: http://codereview.chromium.org/465040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34397 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/webplugin_delegate_proxy.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'chrome/renderer/webplugin_delegate_proxy.cc') diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index 66aa755..78f3dfe 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -27,6 +27,7 @@ #include "chrome/plugin/npobject_proxy.h" #include "chrome/plugin/npobject_stub.h" #include "chrome/plugin/npobject_util.h" +#include "chrome/renderer/command_buffer_proxy.h" #include "chrome/renderer/render_thread.h" #include "chrome/renderer/render_view.h" #include "grit/generated_resources.h" @@ -1141,6 +1142,20 @@ WebPluginDelegateProxy::CreateResourceClient( return proxy; } +CommandBufferProxy* WebPluginDelegateProxy::CreateCommandBuffer() { +#if defined(ENABLE_GPU) + int command_buffer_id; + if (!Send(new PluginMsg_CreateCommandBuffer(instance_id_, + &command_buffer_id))) { + return NULL; + } + + return new CommandBufferProxy(channel_host_, command_buffer_id); +#else + return NULL; +#endif +} + void WebPluginDelegateProxy::OnCancelDocumentLoad() { plugin_->CancelDocumentLoad(); } -- cgit v1.1