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

Unified Diff: ppapi/proxy/ppb_pdf_proxy.cc

Issue 7587011: Remove the old type system for proxied resources. These were no longer being used. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: New one 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 | « ppapi/proxy/ppb_image_data_proxy.cc ('k') | ppapi/proxy/ppb_video_capture_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_pdf_proxy.cc
diff --git a/ppapi/proxy/ppb_pdf_proxy.cc b/ppapi/proxy/ppb_pdf_proxy.cc
index 6df535576ff43694894bc0802b94d0f16a95c47a..14dcb8de945768166e024a41e314a1f2bdd1ff03 100644
--- a/ppapi/proxy/ppb_pdf_proxy.cc
+++ b/ppapi/proxy/ppb_pdf_proxy.cc
@@ -16,18 +16,23 @@
#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::thunk::PPB_PDFFont_API;
+using ppapi::thunk::EnterResource;
namespace pp {
namespace proxy {
-class PrivateFontFile : public PluginResource {
+class PrivateFontFile : public PluginResource,
+ public PPB_PDFFont_API {
public:
PrivateFontFile(const HostResource& resource) : PluginResource(resource) {
}
virtual ~PrivateFontFile() {}
- // Resource overrides.
- virtual PrivateFontFile* AsPrivateFontFile() { return this; }
+ PPB_PDFFont_API* AsPPB_PDFFont_API() { return this; }
// Sees if we have a cache of the font table and returns a pointer to it.
// Returns NULL if we don't have it.
@@ -83,9 +88,11 @@ bool GetFontTableForPrivateFontFile(PP_Resource font_file,
uint32_t table,
void* output,
uint32_t* output_length) {
- PrivateFontFile* object = PluginResource::GetAs<PrivateFontFile>(font_file);
- if (!object)
+ EnterResource<PPB_PDFFont_API> enter(font_file, true);
+ if (enter.failed())
return false;
+
+ PrivateFontFile* object = static_cast<PrivateFontFile*>(enter.object());
PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(
object->instance());
if (!dispatcher)
« no previous file with comments | « ppapi/proxy/ppb_image_data_proxy.cc ('k') | ppapi/proxy/ppb_video_capture_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698