Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: ppapi/proxy/ppb_buffer_proxy.h

Issue 7545014: Implement PPAPI VideoDecode out-of-process support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: responding to brettw Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_buffer_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_buffer_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698