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

Unified Diff: ppapi/proxy/ppb_pdf_proxy.cc

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments 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/ppb_pdf_proxy.cc
diff --git a/ppapi/proxy/ppb_pdf_proxy.cc b/ppapi/proxy/ppb_pdf_proxy.cc
index 5711030197630fcbc799f46016aa5a09490f3efe..b7b3704994832c560f5b0104d4ecb24ae5e2e7e1 100644
--- a/ppapi/proxy/ppb_pdf_proxy.cc
+++ b/ppapi/proxy/ppb_pdf_proxy.cc
@@ -13,23 +13,23 @@
#include "build/build_config.h"
#include "ppapi/c/private/ppb_pdf.h"
#include "ppapi/proxy/plugin_dispatcher.h"
-#include "ppapi/proxy/plugin_resource.h"
#include "ppapi/proxy/plugin_resource_tracker.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_pdf_api.h"
using ppapi::HostResource;
+using ppapi::Resource;
using ppapi::thunk::PPB_PDFFont_API;
using ppapi::thunk::EnterResource;
namespace pp {
namespace proxy {
-class PrivateFontFile : public PluginResource,
+class PrivateFontFile : public Resource,
public PPB_PDFFont_API {
public:
- PrivateFontFile(const HostResource& resource) : PluginResource(resource) {
+ PrivateFontFile(const HostResource& resource) : Resource(resource) {
}
virtual ~PrivateFontFile() {}
@@ -80,9 +80,7 @@ PP_Resource GetFontFileWithFallback(
INTERFACE_ID_PPB_PDF, instance, desc, charset, &result));
if (result.is_null())
return 0;
-
- return PluginResourceTracker::GetInstance()->AddResource(
- new PrivateFontFile(result));
+ return (new PrivateFontFile(result))->GetReference();
}
bool GetFontTableForPrivateFontFile(PP_Resource font_file,
@@ -95,7 +93,7 @@ bool GetFontTableForPrivateFontFile(PP_Resource font_file,
PrivateFontFile* object = static_cast<PrivateFontFile*>(enter.object());
PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(
- object->instance());
+ object->pp_instance());
if (!dispatcher)
return false;

Powered by Google App Engine
This is Rietveld 408576698