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

Unified Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 11578038: Convert pepper font list to new resource system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 8 years 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/shared_impl/resource.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 f8b7b218ef27b256be6c90b5c6d93bf9bcbd6919..61ddab445dfaa2883f4e4dd5dfb00152d2090bac 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -15,6 +15,7 @@
#include "ppapi/c/ppb_mouse_lock.h"
#include "ppapi/c/private/pp_content_decryptor.h"
#include "ppapi/proxy/broker_resource.h"
+#include "ppapi/proxy/browser_font_singleton_resource.h"
#include "ppapi/proxy/content_decryptor_private_serializer.h"
#include "ppapi/proxy/enter_proxy.h"
#include "ppapi/proxy/flash_clipboard_resource.h"
@@ -323,21 +324,6 @@ void PPB_Instance_Proxy::SelectedFindResultChanged(PP_Instance instance,
NOTIMPLEMENTED(); // Not proxied yet.
}
-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()->GetBrowserSender()->Send(
- 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;
@@ -379,8 +365,11 @@ Resource* PPB_Instance_Proxy::GetSingletonResource(PP_Instance instance,
case GAMEPAD_SINGLETON_ID:
new_singleton = new GamepadResource(connection, instance);
break;
-// Flash resources aren't needed for NaCl.
+// Flash/trusted resources aren't needed for NaCl.
#if !defined(OS_NACL) && !defined(NACL_WIN64)
+ case BROWSER_FONT_SINGLETON_ID:
+ new_singleton = new BrowserFontSingletonResource(connection, instance);
+ break;
case FLASH_CLIPBOARD_SINGLETON_ID:
new_singleton = new FlashClipboardResource(connection, instance);
break;
@@ -395,6 +384,7 @@ Resource* PPB_Instance_Proxy::GetSingletonResource(PP_Instance instance,
static_cast<PluginDispatcher*>(dispatcher()));
break;
#else
+ case BROWSER_FONT_SINGLETON_ID:
case FLASH_CLIPBOARD_SINGLETON_ID:
case FLASH_FILE_SINGLETON_ID:
case FLASH_FULLSCREEN_SINGLETON_ID:
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/shared_impl/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698