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

Unified Diff: ppapi/proxy/ppb_fullscreen_proxy.cc

Issue 6923001: Pass fullscreen state along with DidChangeView to avoid sync messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 8 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') | 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_fullscreen_proxy.cc
diff --git a/ppapi/proxy/ppb_fullscreen_proxy.cc b/ppapi/proxy/ppb_fullscreen_proxy.cc
index 12848bb8e5367b67eccf640dca287885a765574f..ac768d4090857574160e76a92d78ff599f37f40e 100644
--- a/ppapi/proxy/ppb_fullscreen_proxy.cc
+++ b/ppapi/proxy/ppb_fullscreen_proxy.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -17,11 +17,10 @@ PP_Bool IsFullscreen(PP_Instance instance) {
PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
if (!dispatcher)
return PP_FALSE;
-
- PP_Bool result = PP_FALSE;
- dispatcher->Send(new PpapiHostMsg_PPBFullscreen_IsFullscreen(
- INTERFACE_ID_PPB_FULLSCREEN, instance, &result));
- return result;
+ InstanceData* data = dispatcher->GetInstanceData(instance);
+ if (!data)
+ return PP_FALSE;
+ return data->fullscreen;
}
PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) {
@@ -82,8 +81,6 @@ const InterfaceProxy::Info* PPB_Fullscreen_Proxy::GetInfo() {
bool PPB_Fullscreen_Proxy::OnMessageReceived(const IPC::Message& msg) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(PPB_Fullscreen_Proxy, msg)
- IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFullscreen_IsFullscreen,
- OnMsgIsFullscreen)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFullscreen_SetFullscreen,
OnMsgSetFullscreen)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFullscreen_GetScreenSize,
@@ -94,11 +91,6 @@ bool PPB_Fullscreen_Proxy::OnMessageReceived(const IPC::Message& msg) {
return handled;
}
-void PPB_Fullscreen_Proxy::OnMsgIsFullscreen(PP_Instance instance,
- PP_Bool* result) {
- *result = ppb_fullscreen_target()->IsFullscreen(instance);
-}
-
void PPB_Fullscreen_Proxy::OnMsgSetFullscreen(PP_Instance instance,
PP_Bool fullscreen,
PP_Bool* result) {
« no previous file with comments | « ppapi/proxy/ppb_fullscreen_proxy.h ('k') | ppapi/proxy/ppp_instance_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698