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

Unified Diff: chrome/renderer/chrome_ppb_pdf_impl.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
« no previous file with comments | « no previous file | ppapi/ppapi_proxy.gypi » ('j') | ppapi/proxy/ppb_audio_proxy.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_ppb_pdf_impl.cc
diff --git a/chrome/renderer/chrome_ppb_pdf_impl.cc b/chrome/renderer/chrome_ppb_pdf_impl.cc
index bd8b4c0047e29ef56b428f82ed3f5cf5cc7f0517..8f4f31a74185691b4652ee68643df4d3a300ff00 100644
--- a/chrome/renderer/chrome_ppb_pdf_impl.cc
+++ b/chrome/renderer/chrome_ppb_pdf_impl.cc
@@ -13,6 +13,9 @@
#include "grit/webkit_strings.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/private/ppb_pdf.h"
+#include "ppapi/shared_impl/resource.h"
+#include "ppapi/shared_impl/resource_tracker.h"
+#include "ppapi/shared_impl/tracker_base.h"
#include "ppapi/shared_impl/var.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -208,14 +211,12 @@ bool GetFontTableForPrivateFontFile(PP_Resource font_file,
void* output,
uint32_t* output_length) {
#if defined(OS_LINUX)
- scoped_refptr<webkit::ppapi::Resource>
- resource(webkit::ppapi::ResourceTracker::Get()->GetResource(font_file));
- if (!resource.get())
+ ppapi::Resource* resource =
+ ppapi::TrackerBase::Get()->GetResourceTracker()->GetResource(font_file);
+ if (!resource)
return false;
- PrivateFontFile* font = static_cast<PrivateFontFile*>(resource.get());
- if (!font)
- return false;
+ PrivateFontFile* font = static_cast<PrivateFontFile*>(resource);
return font->GetFontTable(table, output, output_length);
#else
return false;
« no previous file with comments | « no previous file | ppapi/ppapi_proxy.gypi » ('j') | ppapi/proxy/ppb_audio_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698