Chromium Code Reviews| Index: ppapi/proxy/resource_creation_proxy.cc |
| diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc |
| index bb103c3ce6e07c413786c3a6f5e32f26c7e15b2b..2ad19d35e16e0c4db2a834d223c3dcd48224d1b3 100644 |
| --- a/ppapi/proxy/resource_creation_proxy.cc |
| +++ b/ppapi/proxy/resource_creation_proxy.cc |
| @@ -8,6 +8,7 @@ |
| #include "ppapi/c/pp_size.h" |
| #include "ppapi/c/trusted/ppb_image_data_trusted.h" |
| #include "ppapi/proxy/audio_input_resource.h" |
| +#include "ppapi/proxy/browser_font_resource_trusted.h" |
| #include "ppapi/proxy/connection.h" |
| #include "ppapi/proxy/file_chooser_resource.h" |
| #include "ppapi/proxy/flash_device_id_resource.h" |
| @@ -47,7 +48,6 @@ |
| #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
| #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| #include "ppapi/shared_impl/ppb_resource_array_shared.h" |
| -#include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h" |
| #include "ppapi/shared_impl/var.h" |
| #include "ppapi/thunk/enter.h" |
| #include "ppapi/thunk/ppb_image_data_api.h" |
| @@ -293,8 +293,14 @@ PP_Resource ResourceCreationProxy::CreateBrowserFont( |
| PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); |
| if (!dispatcher) |
| return 0; |
| - return PPB_BrowserFont_Trusted_Shared::Create( |
| - OBJECT_IS_PROXY, instance, *description, dispatcher->preferences()); |
| + scoped_refptr<BrowserFontResource_Trusted> font( |
| + new BrowserFontResource_Trusted(GetConnection(), |
| + instance, |
| + *description, |
| + dispatcher->preferences())); |
| + if (!BrowserFontResource_Trusted::IsPPFontDescriptionValid(*description)) |
|
brettw
2012/11/26 23:50:37
Also move this before creating the BrowserFontReso
victorhsieh
2012/11/27 03:00:50
Done.
|
| + return 0; |
| + return font->GetReference(); |
| } |
| PP_Resource ResourceCreationProxy::CreateBuffer(PP_Instance instance, |