summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppb_graphics_2d_proxy.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-15 03:44:13 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-15 03:44:13 +0000
commit859a7f3a9264b3a2174e9625d6cfa20412ac6081 (patch)
treeb9911798925fbff065346fa6c085b254d7fb2e55 /ppapi/proxy/ppb_graphics_2d_proxy.cc
parentf615770cd0412b2524b8b4451e6518608af9abed (diff)
downloadchromium_src-859a7f3a9264b3a2174e9625d6cfa20412ac6081.zip
chromium_src-859a7f3a9264b3a2174e9625d6cfa20412ac6081.tar.gz
chromium_src-859a7f3a9264b3a2174e9625d6cfa20412ac6081.tar.bz2
Make PP_Resources associated with the Instance rather than the module. This
adds PP_Instance to the necessary places in the API to make this possible. String and Object vars used to be PP_Resources. But it is not practical to assocaited strings with an instance since then we can't have implicit var constructors and have to litter every string with an instance. So this changes vars to use their own tracking system associated with the module (i.e. keeping the current semantics) and making it no longer a resource. I made the internal Var IDs 32 bits since Neb is about to land his 64->32 change. Now it force-deletes resources associated with an instance when that instance goes away. I added some additional code and tracking in ResourceTracker to do this. I could then remove the Instance::Observer class since the resource can use the (now renamed) StoppedTracking to know that it's being deleted in response to the instance being destroyed. TEST=ppapi ui tests BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71544 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_graphics_2d_proxy.cc')
-rw-r--r--ppapi/proxy/ppb_graphics_2d_proxy.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/ppapi/proxy/ppb_graphics_2d_proxy.cc b/ppapi/proxy/ppb_graphics_2d_proxy.cc
index 06d5d0a..033f71c 100644
--- a/ppapi/proxy/ppb_graphics_2d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_2d_proxy.cc
@@ -55,13 +55,13 @@ class Graphics2D : public PluginResource {
namespace {
-PP_Resource Create(PP_Module module_id,
+PP_Resource Create(PP_Instance instance,
const PP_Size* size,
PP_Bool is_always_opaque) {
PluginDispatcher* dispatcher = PluginDispatcher::Get();
PP_Resource result = 0;
dispatcher->Send(new PpapiHostMsg_PPBGraphics2D_Create(
- INTERFACE_ID_PPB_GRAPHICS_2D, module_id, *size, is_always_opaque,
+ INTERFACE_ID_PPB_GRAPHICS_2D, instance, *size, is_always_opaque,
&result));
if (result) {
linked_ptr<Graphics2D> graphics_2d(new Graphics2D(*size, is_always_opaque));
@@ -188,12 +188,12 @@ bool PPB_Graphics2D_Proxy::OnMessageReceived(const IPC::Message& msg) {
return handled;
}
-void PPB_Graphics2D_Proxy::OnMsgCreate(PP_Module module,
+void PPB_Graphics2D_Proxy::OnMsgCreate(PP_Instance instance,
const PP_Size& size,
PP_Bool is_always_opaque,
PP_Resource* result) {
*result = ppb_graphics_2d_target()->Create(
- module, &size, is_always_opaque);
+ instance, &size, is_always_opaque);
}
void PPB_Graphics2D_Proxy::OnMsgPaintImageData(PP_Resource graphics_2d,