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

Unified Diff: ppapi/proxy/ppb_fullscreen_proxy.cc

Issue 6625034: Clarify/fix fullscreen semantics, and add GetScreenSize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix review comments Created 9 years, 9 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_fullscreen_proxy.h ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_fullscreen_proxy.cc
diff --git a/ppapi/proxy/ppb_fullscreen_proxy.cc b/ppapi/proxy/ppb_fullscreen_proxy.cc
index 19c9ead7aba2e5f78bfbd162316093feb8e0e5d4..12848bb8e5367b67eccf640dca287885a765574f 100644
--- a/ppapi/proxy/ppb_fullscreen_proxy.cc
+++ b/ppapi/proxy/ppb_fullscreen_proxy.cc
@@ -35,9 +35,21 @@ PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) {
return result;
}
+PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) {
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
+ if (!dispatcher)
+ return PP_FALSE;
+
+ PP_Bool result = PP_FALSE;
+ dispatcher->Send(new PpapiHostMsg_PPBFullscreen_GetScreenSize(
+ INTERFACE_ID_PPB_FULLSCREEN, instance, &result, size));
+ return result;
+}
+
const PPB_Fullscreen_Dev fullscreen_interface = {
&IsFullscreen,
- &SetFullscreen
+ &SetFullscreen,
+ &GetScreenSize
};
InterfaceProxy* CreateFullscreenProxy(Dispatcher* dispatcher,
@@ -74,6 +86,8 @@ bool PPB_Fullscreen_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnMsgIsFullscreen)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFullscreen_SetFullscreen,
OnMsgSetFullscreen)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFullscreen_GetScreenSize,
+ OnMsgGetScreenSize)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
// TODO(brettw): handle bad messages!
@@ -91,5 +105,11 @@ void PPB_Fullscreen_Proxy::OnMsgSetFullscreen(PP_Instance instance,
*result = ppb_fullscreen_target()->SetFullscreen(instance, fullscreen);
}
+void PPB_Fullscreen_Proxy::OnMsgGetScreenSize(PP_Instance instance,
+ PP_Bool* result,
+ PP_Size* size) {
+ *result = ppb_fullscreen_target()->GetScreenSize(instance, size);
+}
+
} // namespace proxy
} // namespace pp
« no previous file with comments | « ppapi/proxy/ppb_fullscreen_proxy.h ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698