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

Unified Diff: ppapi/proxy/ppb_flash_proxy.cc

Issue 11413200: Refactored PPB_Flash GetSettings to the new pepper resource model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: ppapi/proxy/ppb_flash_proxy.cc
diff --git a/ppapi/proxy/ppb_flash_proxy.cc b/ppapi/proxy/ppb_flash_proxy.cc
index 9e06eded1de8368136875c847f06ad33bc413558..c9950a40bca2d2463b7848dfae1305fa935fb31f 100644
--- a/ppapi/proxy/ppb_flash_proxy.cc
+++ b/ppapi/proxy/ppb_flash_proxy.cc
@@ -111,8 +111,6 @@ bool PPB_Flash_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnHostMsgIsRectTopmost)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlash_InvokePrinting,
OnHostMsgInvokePrinting)
- IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlash_GetSetting,
- OnHostMsgGetSetting)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
// TODO(brettw) handle bad messages!
@@ -252,34 +250,6 @@ PP_Bool PPB_Flash_Proxy::IsRectTopmost(PP_Instance instance,
return result;
}
-PP_Var PPB_Flash_Proxy::GetSetting(PP_Instance instance,
- PP_FlashSetting setting) {
- PluginDispatcher* plugin_dispatcher =
- static_cast<PluginDispatcher*>(dispatcher());
- switch (setting) {
- case PP_FLASHSETTING_3DENABLED:
- return PP_MakeBool(PP_FromBool(
- plugin_dispatcher->preferences().is_3d_supported));
- case PP_FLASHSETTING_INCOGNITO:
- return PP_MakeBool(PP_FromBool(plugin_dispatcher->incognito()));
- case PP_FLASHSETTING_STAGE3DENABLED:
- return PP_MakeBool(PP_FromBool(
- plugin_dispatcher->preferences().is_stage3d_supported));
- case PP_FLASHSETTING_LANGUAGE:
- return StringVar::StringToPPVar(
- PluginGlobals::Get()->GetUILanguage());
- case PP_FLASHSETTING_NUMCORES:
- return PP_MakeInt32(plugin_dispatcher->preferences().number_of_cpu_cores);
- case PP_FLASHSETTING_LSORESTRICTIONS: {
- ReceiveSerializedVarReturnValue result;
- dispatcher()->Send(new PpapiHostMsg_PPBFlash_GetSetting(
- API_ID_PPB_FLASH, instance, setting, &result));
- return result.Return(dispatcher());
- }
- }
- return PP_MakeUndefined();
-}
-
void PPB_Flash_Proxy::OnHostMsgSetInstanceAlwaysOnTop(PP_Instance instance,
PP_Bool on_top) {
EnterInstanceNoLock enter(instance);
@@ -370,19 +340,6 @@ void PPB_Flash_Proxy::OnHostMsgIsRectTopmost(PP_Instance instance,
*result = PP_FALSE;
}
-void PPB_Flash_Proxy::OnHostMsgGetSetting(PP_Instance instance,
- PP_FlashSetting setting,
- SerializedVarReturnValue id) {
- EnterInstanceNoLock enter(instance);
- if (enter.succeeded()) {
- id.Return(dispatcher(),
- enter.functions()->GetFlashAPI()->GetSetting(
- instance, setting));
- } else {
- id.Return(dispatcher(), PP_MakeUndefined());
- }
-}
-
void PPB_Flash_Proxy::OnHostMsgInvokePrinting(PP_Instance instance) {
// This function is actually implemented in the PPB_Flash_Print interface.
// It's rarely used enough that we just request this interface when needed.

Powered by Google App Engine
This is Rietveld 408576698