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

Unified Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 9360045: Rename PPB_Font to PPB_BrowserFont_Trusted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months 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
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/proxy/resource_creation_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_instance_proxy.cc
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index 62335c2c2ff8f62f6deac79d0f49d0e47430ea81..c992a265edbf93d1d662176e90cfa9c80d7867a9 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -12,11 +12,13 @@
#include "ppapi/proxy/enter_proxy.h"
#include "ppapi/proxy/host_dispatcher.h"
#include "ppapi/proxy/plugin_dispatcher.h"
+#include "ppapi/proxy/plugin_proxy_delegate.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/serialized_var.h"
#include "ppapi/shared_impl/ppapi_globals.h"
#include "ppapi/shared_impl/ppb_url_util_shared.h"
#include "ppapi/shared_impl/ppb_view_shared.h"
+#include "ppapi/shared_impl/var.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/thunk.h"
@@ -213,6 +215,21 @@ PP_Bool PPB_Instance_Proxy::FlashIsFullscreen(PP_Instance instance) {
return data->flash_fullscreen;
}
+PP_Var PPB_Instance_Proxy::GetFontFamilies(PP_Instance instance) {
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
+ if (!dispatcher)
+ return PP_MakeUndefined();
+
+ // Assume the font families don't change, so we can cache the result globally.
+ CR_DEFINE_STATIC_LOCAL(std::string, families, ());
+ if (families.empty()) {
+ PluginGlobals::Get()->plugin_proxy_delegate()->SendToBrowser(
+ new PpapiHostMsg_PPBInstance_GetFontFamilies(&families));
+ }
+
+ return StringVar::StringToPPVar(families);
+}
+
PP_Bool PPB_Instance_Proxy::SetFullscreen(PP_Instance instance,
PP_Bool fullscreen) {
PP_Bool result = PP_FALSE;
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/proxy/resource_creation_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698