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

Unified Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 7826017: Add PPB_Fullscreen;0.5. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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/ppp_instance_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
===================================================================
--- ppapi/proxy/ppb_instance_proxy.cc (revision 102885)
+++ ppapi/proxy/ppb_instance_proxy.cc (working copy)
@@ -87,6 +87,10 @@
OnMsgFlashSetFullscreen)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_FlashGetScreenSize,
OnMsgFlashGetScreenSize)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SetFullscreen,
+ OnMsgSetFullscreen)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetScreenSize,
+ OnMsgGetScreenSize)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_RequestInputEvents,
OnMsgRequestInputEvents)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ClearInputEvents,
@@ -181,7 +185,7 @@
NOTIMPLEMENTED(); // Not proxied yet.
}
-PP_Bool PPB_Instance_Proxy::FlashIsFullscreen(PP_Instance instance) {
+PP_Bool PPB_Instance_Proxy::IsFullscreen(PP_Instance instance) {
InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
GetInstanceData(instance);
if (!data)
@@ -189,6 +193,22 @@
return data->fullscreen;
}
+PP_Bool PPB_Instance_Proxy::FlashIsFullscreen(PP_Instance instance) {
+ InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
+ GetInstanceData(instance);
+ if (!data)
+ return PP_FALSE;
+ return data->flash_fullscreen;
+}
+
+PP_Bool PPB_Instance_Proxy::SetFullscreen(PP_Instance instance,
+ PP_Bool fullscreen) {
+ PP_Bool result = PP_FALSE;
+ dispatcher()->Send(new PpapiHostMsg_PPBInstance_SetFullscreen(
+ INTERFACE_ID_PPB_INSTANCE, instance, fullscreen, &result));
+ return result;
+}
+
PP_Bool PPB_Instance_Proxy::FlashSetFullscreen(PP_Instance instance,
PP_Bool fullscreen) {
PP_Bool result = PP_FALSE;
@@ -197,6 +217,14 @@
return result;
}
+PP_Bool PPB_Instance_Proxy::GetScreenSize(PP_Instance instance,
+ PP_Size* size) {
+ PP_Bool result = PP_FALSE;
+ dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetScreenSize(
+ INTERFACE_ID_PPB_INSTANCE, instance, &result, size));
+ return result;
+}
+
PP_Bool PPB_Instance_Proxy::FlashGetScreenSize(PP_Instance instance,
PP_Size* size) {
PP_Bool result = PP_FALSE;
@@ -349,18 +377,35 @@
}
}
+void PPB_Instance_Proxy::OnMsgSetFullscreen(PP_Instance instance,
+ PP_Bool fullscreen,
+ PP_Bool* result) {
+ EnterInstanceNoLock enter(instance, false);
+ if (enter.succeeded())
+ *result = enter.functions()->SetFullscreen(instance, fullscreen);
+}
+
+
void PPB_Instance_Proxy::OnMsgFlashSetFullscreen(PP_Instance instance,
PP_Bool fullscreen,
PP_Bool* result) {
- EnterInstanceNoLock enter(instance, false);
+ EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
if (enter.succeeded())
*result = enter.functions()->FlashSetFullscreen(instance, fullscreen);
}
+void PPB_Instance_Proxy::OnMsgGetScreenSize(PP_Instance instance,
+ PP_Bool* result,
+ PP_Size* size) {
+ EnterInstanceNoLock enter(instance, false);
+ if (enter.succeeded())
+ *result = enter.functions()->GetScreenSize(instance, size);
+}
+
void PPB_Instance_Proxy::OnMsgFlashGetScreenSize(PP_Instance instance,
PP_Bool* result,
PP_Size* size) {
- EnterInstanceNoLock enter(instance, false);
+ EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
if (enter.succeeded())
*result = enter.functions()->FlashGetScreenSize(instance, size);
}
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/proxy/ppp_instance_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698