summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppp_instance_proxy.cc
diff options
context:
space:
mode:
authorpolina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-27 04:24:30 +0000
committerpolina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-27 04:24:30 +0000
commit06e0a34ae11c97e35ae67f6a006dc4a45cda58af (patch)
treea6766fa80232f512030a7c68726c5c6137e5a52d /ppapi/proxy/ppp_instance_proxy.cc
parent325e9d2d3e52b4402c82c9b3c0c2163ef0f09020 (diff)
downloadchromium_src-06e0a34ae11c97e35ae67f6a006dc4a45cda58af.zip
chromium_src-06e0a34ae11c97e35ae67f6a006dc4a45cda58af.tar.gz
chromium_src-06e0a34ae11c97e35ae67f6a006dc4a45cda58af.tar.bz2
Add PPB_Fullscreen_Dev;0.5. Keep 0.4 for backwards compatiblity and point it
to PPB_FlashFullscreen. The new implementation is based on http://codereview.chromium.org/7714017/ with some bug fixes. Update header comments. Main API differences between the old and the new implementation: - transition from fullscreen is now asynchronous and ends at DidChangeView just like transition to fullscreen; graphics devices cannot be bound during the transition. - when switching to/from fullscreen 3D resources no longer need to be re-created. - transitions to fullscreen are only possible when processing user user gestures. - transition to fullscreen results in 2 DidChangeViews, one for moving the plugin to the middle of the window and one for stretching the window and placing the plugin in the middle of the screen. - the size of the plugin is not changed when going to/from fullscreen. Testing: - Mapped ppapi_tests:test_fullscreen to ppapi_tests:test_flash_fullscreen. - Updated test_fullscreen to work with the new implementation. To be testable automatically this needs enhancements to the testing infrastructure for generating user gestures. For now marked the test as DISABLED. - Disabled NaCl's ppapi_ppb_fullscreen_browser_test for the same reasons as above. - To re-enable both tests, we will first need to add user gesture capabilites to PPB_Testing. - Build 0.4 ppapi_test:test_fullscreen and ran this out of process and in process with the newly build revision of chrome to verify backwards compatability. - In a separate CL, will update NaCl's ppapi_ppb_fullscreen_browser_test to work with the new implementation, for now only manually. BUG=41780 TEST=see above Review URL: http://codereview.chromium.org/7826017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppp_instance_proxy.cc')
-rw-r--r--ppapi/proxy/ppp_instance_proxy.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc
index 19b23f8..c3e7395 100644
--- a/ppapi/proxy/ppp_instance_proxy.cc
+++ b/ppapi/proxy/ppp_instance_proxy.cc
@@ -52,11 +52,18 @@ void DidChangeView(PP_Instance instance,
static_cast<const PPB_FlashFullscreen*>(
dispatcher->local_get_interface()(PPB_FLASHFULLSCREEN_INTERFACE));
DCHECK(fullscreen_interface);
+ const PPB_FlashFullscreen* flash_fullscreen_interface =
+ static_cast<const PPB_FlashFullscreen*>(
+ dispatcher->local_get_interface()(PPB_FLASHFULLSCREEN_INTERFACE));
+ DCHECK(flash_fullscreen_interface);
PP_Bool fullscreen = fullscreen_interface->IsFullscreen(instance);
+ PP_Bool flash_fullscreen =
+ flash_fullscreen_interface->IsFullscreen(instance);
dispatcher->Send(
new PpapiMsg_PPPInstance_DidChangeView(INTERFACE_ID_PPP_INSTANCE,
instance, *position, *clip,
- fullscreen));
+ fullscreen,
+ flash_fullscreen));
}
void DidChangeFocus(PP_Instance instance, PP_Bool has_focus) {
@@ -196,7 +203,8 @@ void PPP_Instance_Proxy::OnMsgDidDestroy(PP_Instance instance) {
void PPP_Instance_Proxy::OnMsgDidChangeView(PP_Instance instance,
const PP_Rect& position,
const PP_Rect& clip,
- PP_Bool fullscreen) {
+ PP_Bool fullscreen,
+ PP_Bool flash_fullscreen) {
PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
if (!dispatcher)
return;
@@ -205,6 +213,7 @@ void PPP_Instance_Proxy::OnMsgDidChangeView(PP_Instance instance,
return;
data->position = position;
data->fullscreen = fullscreen;
+ data->flash_fullscreen = flash_fullscreen;
combined_interface_->DidChangeView(instance, &position, &clip);
}