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

Unified Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 11316161: Refactor BrowserFont to new design (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
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..4991f1718b58d5f62fd2aa807feb2b5898a0cb0d 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,10 @@ 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());
+ if (!BrowserFontResource_Trusted::IsPPFontDescriptionValid(*description))
+ return 0;
+ return (new BrowserFontResource_Trusted(GetConnection(), instance,
+ *description, dispatcher->preferences()))->GetReference();
}
PP_Resource ResourceCreationProxy::CreateBuffer(PP_Instance instance,
« no previous file with comments | « ppapi/proxy/browser_font_resource_trusted.cc ('k') | ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698