Index: webkit/plugins/ppapi/resource_creation_impl.cc |
=================================================================== |
--- webkit/plugins/ppapi/resource_creation_impl.cc (revision 84713) |
+++ webkit/plugins/ppapi/resource_creation_impl.cc (working copy) |
@@ -5,7 +5,9 @@ |
#include "webkit/plugins/ppapi/resource_creation_impl.h" |
#include "ppapi/c/pp_size.h" |
+#include "ppapi/shared_impl/font_impl.h" |
#include "webkit/plugins/ppapi/common.h" |
+#include "webkit/plugins/ppapi/ppb_font_impl.h" |
#include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" |
#include "webkit/plugins/ppapi/ppb_image_data_impl.h" |
@@ -23,6 +25,20 @@ |
return this; |
} |
+PP_Resource ResourceCreationImpl::CreateFontObject( |
+ PP_Instance pp_instance, |
+ const PP_FontDescription_Dev* description) { |
+ PluginInstance* instance = ResourceTracker::Get()->GetInstance(pp_instance); |
+ if (!instance) |
+ return 0; |
+ |
+ if (!pp::shared_impl::FontImpl::IsPPFontDescriptionValid(*description)) |
+ return 0; |
+ |
+ scoped_refptr<PPB_Font_Impl> font(new PPB_Font_Impl(instance, *description)); |
+ return font->GetReference(); |
+} |
+ |
PP_Resource ResourceCreationImpl::CreateGraphics2D( |
PP_Instance pp_instance, |
const PP_Size& size, |