summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-02 21:50:16 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-02 21:50:16 +0000
commitea628e3833a438a6114d369209a2be3ab1436d80 (patch)
tree19fd1bdac6bb36edb1007011963114ab5aece452 /ppapi/proxy
parentecf5a6df0184eb0ceb9d21000a3b20293f29f1ee (diff)
downloadchromium_src-ea628e3833a438a6114d369209a2be3ab1436d80.zip
chromium_src-ea628e3833a438a6114d369209a2be3ab1436d80.tar.gz
chromium_src-ea628e3833a438a6114d369209a2be3ab1436d80.tar.bz2
Add PP_FlashLSORestrictions to the list of settings supported by the Flash_GetSetting Pepper API.
BUG=132410 Review URL: https://chromiumcodereview.appspot.com/10831045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149711 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
-rw-r--r--ppapi/proxy/ppapi_messages.h6
-rw-r--r--ppapi/proxy/ppb_flash_proxy.cc21
-rw-r--r--ppapi/proxy/ppb_flash_proxy.h3
3 files changed, 30 insertions, 0 deletions
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h
index 7d392b5..20a33f3 100644
--- a/ppapi/proxy/ppapi_messages.h
+++ b/ppapi/proxy/ppapi_messages.h
@@ -31,6 +31,7 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_size.h"
#include "ppapi/c/pp_time.h"
+#include "ppapi/c/private/ppb_flash.h"
#include "ppapi/c/private/ppb_host_resolver_private.h"
#include "ppapi/c/private/ppb_net_address_private.h"
#include "ppapi/c/private/ppb_tcp_socket_private.h"
@@ -58,6 +59,7 @@
IPC_ENUM_TRAITS(PP_DeviceType_Dev)
IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_Permission)
IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_SettingType)
+IPC_ENUM_TRAITS(PP_FlashSetting)
IPC_ENUM_TRAITS(PP_InputEvent_MouseButton)
IPC_ENUM_TRAITS(PP_InputEvent_Type)
IPC_ENUM_TRAITS(PP_NetAddressFamily_Private)
@@ -1304,6 +1306,10 @@ IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBFlash_QueryFileRef,
ppapi::HostResource /* file_ref */,
PP_FileInfo /* info */,
int32_t /* result */)
+IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBFlash_GetSetting,
+ PP_Instance /* instance */,
+ PP_FlashSetting /* setting */,
+ ppapi::proxy::SerializedVar /* result */)
IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBFlash_InvokePrinting,
PP_Instance /* instance */)
diff --git a/ppapi/proxy/ppb_flash_proxy.cc b/ppapi/proxy/ppb_flash_proxy.cc
index 227fda1..d99a816 100644
--- a/ppapi/proxy/ppb_flash_proxy.cc
+++ b/ppapi/proxy/ppb_flash_proxy.cc
@@ -126,6 +126,8 @@ bool PPB_Flash_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnHostMsgGetDeviceID)
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!
@@ -304,6 +306,12 @@ PP_Var PPB_Flash_Proxy::GetSetting(PP_Instance instance,
PluginGlobals::Get()->plugin_proxy_delegate()->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();
}
@@ -831,6 +839,19 @@ void PPB_Flash_Proxy::OnHostMsgQueryFileRef(
instance, host_resource.host_resource(), info);
}
+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::OnHostMsgGetDeviceID(PP_Instance instance,
SerializedVarReturnValue id) {
EnterInstanceNoLock enter(instance);
diff --git a/ppapi/proxy/ppb_flash_proxy.h b/ppapi/proxy/ppb_flash_proxy.h
index a0c273f..99dfabd 100644
--- a/ppapi/proxy/ppb_flash_proxy.h
+++ b/ppapi/proxy/ppb_flash_proxy.h
@@ -178,6 +178,9 @@ class PPB_Flash_Proxy : public InterfaceProxy, public PPB_Flash_Shared {
int32_t* result);
void OnHostMsgGetDeviceID(PP_Instance instance,
SerializedVarReturnValue id);
+ void OnHostMsgGetSetting(PP_Instance instance,
+ PP_FlashSetting setting,
+ SerializedVarReturnValue result);
void OnHostMsgInvokePrinting(PP_Instance instance);
DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy);