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

Unified Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 7608030: Convert the PluginResource to be refcounted. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 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
Index: ppapi/proxy/resource_creation_proxy.cc
diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc
index 18f481900dfe3a81a5cc8cf3ace6d94829fbcf93..596f7a58f29a069a18ef8946202135b5bb064868 100644
--- a/ppapi/proxy/resource_creation_proxy.cc
+++ b/ppapi/proxy/resource_creation_proxy.cc
@@ -158,9 +158,8 @@ PP_Resource ResourceCreationProxy::CreateFontObject(
if (!ppapi::FontImpl::IsPPFontDescriptionValid(*description))
return 0;
- linked_ptr<Font> object(new Font(HostResource::MakeInstanceOnly(instance),
- *description));
- return PluginResourceTracker::GetInstance()->AddResource(object);
+ return PluginResourceTracker::GetInstance()->AddResource(
+ new Font(HostResource::MakeInstanceOnly(instance), *description));
}
PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance,
@@ -192,8 +191,8 @@ PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance,
PP_ImageDataDesc desc;
memcpy(&desc, image_data_desc.data(), sizeof(PP_ImageDataDesc));
- linked_ptr<ImageData> object(new ImageData(result, desc, image_handle));
- return PluginResourceTracker::GetInstance()->AddResource(object);
+ return PluginResourceTracker::GetInstance()->AddResource(
+ new ImageData(result, desc, image_handle));
}
PP_Resource ResourceCreationProxy::CreateKeyboardInputEvent(
« ppapi/proxy/ppb_video_decoder_proxy.cc ('K') | « ppapi/proxy/ppb_video_decoder_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698