| Index: ppapi/proxy/ppb_buffer_proxy.h
|
| diff --git a/ppapi/proxy/ppb_buffer_proxy.h b/ppapi/proxy/ppb_buffer_proxy.h
|
| index 60029509a2180d01dbae25e46c4f51803bcf78aa..e11b94f656af475a19965c25dd8072b532f28f47 100644
|
| --- a/ppapi/proxy/ppb_buffer_proxy.h
|
| +++ b/ppapi/proxy/ppb_buffer_proxy.h
|
| @@ -8,6 +8,8 @@
|
| #include "base/shared_memory.h"
|
| #include "ppapi/c/pp_instance.h"
|
| #include "ppapi/proxy/interface_proxy.h"
|
| +#include "ppapi/proxy/plugin_resource.h"
|
| +#include "ppapi/thunk/ppb_buffer_api.h"
|
|
|
| struct PPB_Buffer_Dev;
|
|
|
| @@ -16,6 +18,35 @@ namespace proxy {
|
|
|
| class HostResource;
|
|
|
| +class Buffer : public ppapi::thunk::PPB_Buffer_API,
|
| + public PluginResource {
|
| + public:
|
| + Buffer(const HostResource& resource,
|
| + const base::SharedMemoryHandle& shm_handle,
|
| + uint32_t size);
|
| + virtual ~Buffer();
|
| +
|
| + // Resource overrides.
|
| + virtual Buffer* AsBuffer() OVERRIDE;
|
| +
|
| + // ResourceObjectBase overrides.
|
| + virtual ppapi::thunk::PPB_Buffer_API* AsPPB_Buffer_API() OVERRIDE;
|
| +
|
| + // PPB_Buffer_API implementation.
|
| + virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE;
|
| + virtual PP_Bool IsMapped() OVERRIDE;
|
| + virtual void* Map() OVERRIDE;
|
| + virtual void Unmap() OVERRIDE;
|
| +
|
| + private:
|
| + base::SharedMemory shm_;
|
| + uint32_t size_;
|
| + void* mapped_data_;
|
| + int map_count_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Buffer);
|
| +};
|
| +
|
| class PPB_Buffer_Proxy : public InterfaceProxy {
|
| public:
|
| PPB_Buffer_Proxy(Dispatcher* dispatcher, const void* target_interface);
|
|
|