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

Unified Diff: ppapi/proxy/ppb_buffer_proxy.cc

Issue 6282007: First pass at making the proxy handle multiple renderers. This associates the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/ppb_audio_proxy.cc ('k') | ppapi/proxy/ppb_char_set_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.cc
===================================================================
--- ppapi/proxy/ppb_buffer_proxy.cc (revision 71973)
+++ ppapi/proxy/ppb_buffer_proxy.cc (working copy)
@@ -20,7 +20,7 @@
class Buffer : public PluginResource {
public:
- Buffer(int memory_handle, uint32_t size);
+ Buffer(PP_Instance instance, int memory_handle, uint32_t size);
virtual ~Buffer();
// Resource overrides.
@@ -40,8 +40,9 @@
DISALLOW_COPY_AND_ASSIGN(Buffer);
};
-Buffer::Buffer(int memory_handle, uint32_t size)
- : memory_handle_(memory_handle),
+Buffer::Buffer(PP_Instance instance, int memory_handle, uint32_t size)
+ : PluginResource(instance),
+ memory_handle_(memory_handle),
size_(size),
mapped_data_(NULL) {
}
@@ -64,16 +65,16 @@
PP_Resource Create(PP_Instance instance, uint32_t size) {
PP_Resource result = 0;
int32_t shm_handle = -1;
- PluginDispatcher::Get()->Send(
+ PluginDispatcher::GetForInstance(instance)->Send(
new PpapiHostMsg_PPBBuffer_Create(
INTERFACE_ID_PPB_BUFFER, instance, size,
&result, &shm_handle));
if (!result)
return 0;
- linked_ptr<Buffer> object(new Buffer(static_cast<int>(shm_handle), size));
- PluginDispatcher::Get()->plugin_resource_tracker()->AddResource(
- result, object);
+ linked_ptr<Buffer> object(new Buffer(instance, static_cast<int>(shm_handle),
+ size));
+ PluginResourceTracker::GetInstance()->AddResource(result, object);
return result;
}
« no previous file with comments | « ppapi/proxy/ppb_audio_proxy.cc ('k') | ppapi/proxy/ppb_char_set_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698