Chromium Code Reviews| Index: content/renderer/pepper/pepper_in_process_resource_creation.cc |
| diff --git a/content/renderer/pepper/pepper_in_process_resource_creation.cc b/content/renderer/pepper/pepper_in_process_resource_creation.cc |
| index 37599fffeb2056707e81e223bc3a9185880d6dac..e8874676d346ed48cdde138980c39b3e5b5c5622 100644 |
| --- a/content/renderer/pepper/pepper_in_process_resource_creation.cc |
| +++ b/content/renderer/pepper/pepper_in_process_resource_creation.cc |
| @@ -13,6 +13,7 @@ |
| #include "ipc/ipc_message.h" |
| #include "ipc/ipc_message_macros.h" |
| #include "ppapi/host/ppapi_host.h" |
| +#include "ppapi/proxy/browser_font_resource_trusted.h" |
| #include "ppapi/proxy/file_chooser_resource.h" |
| #include "ppapi/proxy/ppapi_messages.h" |
| #include "ppapi/proxy/printing_resource.h" |
| @@ -42,6 +43,23 @@ PepperInProcessResourceCreation::PepperInProcessResourceCreation( |
| PepperInProcessResourceCreation::~PepperInProcessResourceCreation() { |
| } |
| +PP_Resource PepperInProcessResourceCreation::CreateBrowserFont( |
| + PP_Instance instance, |
| + const PP_BrowserFont_Trusted_Description* description) { |
| + ppapi::Preferences prefs( |
| + host_impl_->GetRenderViewForInstance(instance)->GetWebkitPreferences()); |
| + scoped_refptr<ppapi::proxy::BrowserFontResource_Trusted> font( |
| + new ppapi::proxy::BrowserFontResource_Trusted( |
| + host_impl_->in_process_router()->GetPluginConnection(), |
| + instance, |
| + *description, |
| + prefs)); |
| + if (!ppapi::proxy::BrowserFontResource_Trusted::IsPPFontDescriptionValid( |
|
brettw
2012/11/26 23:50:37
Can you do this at the beginning of the function?
victorhsieh
2012/11/27 03:00:50
Done.
|
| + *description)) |
| + return 0; |
| + return font->GetReference(); |
| +} |
| + |
| PP_Resource PepperInProcessResourceCreation::CreateFileChooser( |
| PP_Instance instance, |
| PP_FileChooserMode_Dev mode, |