Index: ppapi/proxy/ppb_buffer_proxy.cc |
=================================================================== |
--- ppapi/proxy/ppb_buffer_proxy.cc (revision 74021) |
+++ ppapi/proxy/ppb_buffer_proxy.cc (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -109,7 +109,7 @@ |
object->Unmap(); |
} |
-const PPB_Buffer_Dev ppb_buffer = { |
+const PPB_Buffer_Dev buffer_interface = { |
&Create, |
&IsBuffer, |
&Describe, |
@@ -117,6 +117,11 @@ |
&Unmap, |
}; |
+InterfaceProxy* CreateBufferProxy(Dispatcher* dispatcher, |
+ const void* target_interface) { |
+ return new PPB_Buffer_Proxy(dispatcher, target_interface); |
+} |
+ |
} // namespace |
PPB_Buffer_Proxy::PPB_Buffer_Proxy(Dispatcher* dispatcher, |
@@ -127,14 +132,18 @@ |
PPB_Buffer_Proxy::~PPB_Buffer_Proxy() { |
} |
-const void* PPB_Buffer_Proxy::GetSourceInterface() const { |
- return &ppb_buffer; |
+// static |
+const InterfaceProxy::Info* PPB_Buffer_Proxy::GetInfo() { |
+ static const Info info = { |
+ &buffer_interface, |
+ PPB_BUFFER_DEV_INTERFACE, |
+ INTERFACE_ID_PPB_BUFFER, |
+ false, |
+ &CreateBufferProxy, |
+ }; |
+ return &info; |
} |
-InterfaceID PPB_Buffer_Proxy::GetInterfaceId() const { |
- return INTERFACE_ID_PPB_BUFFER; |
-} |
- |
bool PPB_Buffer_Proxy::OnMessageReceived(const IPC::Message& msg) { |
bool handled = true; |
IPC_BEGIN_MESSAGE_MAP(PPB_Buffer_Proxy, msg) |