diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-14 17:08:00 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-14 17:08:00 +0000 |
commit | fb35dcfafd929772b185516173a92c619aa97421 (patch) | |
tree | cc7260344ab7f028274c312d646685adcebd95b5 /ppapi/proxy/ppb_pdf_proxy.cc | |
parent | da441db001417a34e7378a95481d237a637488a7 (diff) | |
download | chromium_src-fb35dcfafd929772b185516173a92c619aa97421.zip chromium_src-fb35dcfafd929772b185516173a92c619aa97421.tar.gz chromium_src-fb35dcfafd929772b185516173a92c619aa97421.tar.bz2 |
Implement DrawGlyphs and refactor the FontDescription serialization such
that it can be reused for this code.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_pdf_proxy.cc')
-rw-r--r-- | ppapi/proxy/ppb_pdf_proxy.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/ppapi/proxy/ppb_pdf_proxy.cc b/ppapi/proxy/ppb_pdf_proxy.cc index c706804..580c6b0 100644 --- a/ppapi/proxy/ppb_pdf_proxy.cc +++ b/ppapi/proxy/ppb_pdf_proxy.cc @@ -60,19 +60,18 @@ PP_Resource GetFontFileWithFallback( PP_Module module_id, const PP_FontDescription_Dev* description, PP_PrivateFontCharset charset) { + PluginDispatcher* dispatcher = PluginDispatcher::Get(); SerializedFontDescription desc; - // TODO(brettw): serialize the description! + desc.SetFromPPFontDescription(dispatcher, *description, true); PP_Resource result = 0; - PluginDispatcher::Get()->Send( - new PpapiHostMsg_PPBPdf_GetFontFileWithFallback( - INTERFACE_ID_PPB_PDF, module_id, desc, charset, &result)); + dispatcher->Send(new PpapiHostMsg_PPBPdf_GetFontFileWithFallback( + INTERFACE_ID_PPB_PDF, module_id, desc, charset, &result)); if (!result) return 0; linked_ptr<PrivateFontFile> object(new PrivateFontFile); - PluginDispatcher::Get()->plugin_resource_tracker()->AddResource( - result, object); + dispatcher->plugin_resource_tracker()->AddResource(result, object); return result; } @@ -142,7 +141,7 @@ void PPB_Pdf_Proxy::OnMsgGetFontFileWithFallback( int32_t charset, PP_Resource* result) { PP_FontDescription_Dev desc; - // TODO(brettw) deserialize this value! + in_desc.SetToPPFontDescription(dispatcher(), &desc, false); *result = ppb_pdf_target()->GetFontFileWithFallback(module, &desc, static_cast<PP_PrivateFontCharset>(charset)); } |