diff options
author | polina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-27 04:24:30 +0000 |
---|---|---|
committer | polina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-27 04:24:30 +0000 |
commit | 06e0a34ae11c97e35ae67f6a006dc4a45cda58af (patch) | |
tree | a6766fa80232f512030a7c68726c5c6137e5a52d /ppapi/thunk | |
parent | 325e9d2d3e52b4402c82c9b3c0c2163ef0f09020 (diff) | |
download | chromium_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/thunk')
-rw-r--r-- | ppapi/thunk/interfaces_ppb_private.h | 4 | ||||
-rw-r--r-- | ppapi/thunk/ppb_fullscreen_thunk.cc | 6 | ||||
-rw-r--r-- | ppapi/thunk/ppb_instance_api.h | 6 |
3 files changed, 13 insertions, 3 deletions
diff --git a/ppapi/thunk/interfaces_ppb_private.h b/ppapi/thunk/interfaces_ppb_private.h index f276315..2631552 100644 --- a/ppapi/thunk/interfaces_ppb_private.h +++ b/ppapi/thunk/interfaces_ppb_private.h @@ -11,5 +11,9 @@ PROXIED_API(PPB_Broker) PROXIED_IFACE(PPB_Broker, PPB_BROKER_TRUSTED_INTERFACE_0_2, PPB_BrokerTrusted) PROXIED_IFACE(PPB_Instance, PPB_FLASHFULLSCREEN_INTERFACE, PPB_FlashFullscreen) +// Map the old fullscreen interface string to the Flash one, which is the same +// at the ABI level. TODO(polina): remove this when Flash is updated. +PROXIED_IFACE(PPB_Instance, PPB_FULLSCREEN_DEV_INTERFACE_0_4, + PPB_FlashFullscreen) #include "ppapi/thunk/interfaces_postamble.h" diff --git a/ppapi/thunk/ppb_fullscreen_thunk.cc b/ppapi/thunk/ppb_fullscreen_thunk.cc index bac3b7a..72081f5 100644 --- a/ppapi/thunk/ppb_fullscreen_thunk.cc +++ b/ppapi/thunk/ppb_fullscreen_thunk.cc @@ -17,21 +17,21 @@ PP_Bool IsFullscreen(PP_Instance instance) { EnterFunction<PPB_Instance_FunctionAPI> enter(instance, true); if (enter.failed()) return PP_FALSE; - return enter.functions()->FlashIsFullscreen(instance); + return enter.functions()->IsFullscreen(instance); } PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) { EnterFunction<PPB_Instance_FunctionAPI> enter(instance, true); if (enter.failed()) return PP_FALSE; - return enter.functions()->FlashSetFullscreen(instance, fullscreen); + return enter.functions()->SetFullscreen(instance, fullscreen); } PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) { EnterFunction<PPB_Instance_FunctionAPI> enter(instance, true); if (enter.failed()) return PP_FALSE; - return enter.functions()->FlashGetScreenSize(instance, size); + return enter.functions()->GetScreenSize(instance, size); } const PPB_Fullscreen_Dev g_ppb_fullscreen_thunk = { diff --git a/ppapi/thunk/ppb_instance_api.h b/ppapi/thunk/ppb_instance_api.h index 598b951..f2aa663 100644 --- a/ppapi/thunk/ppb_instance_api.h +++ b/ppapi/thunk/ppb_instance_api.h @@ -46,6 +46,12 @@ class PPB_Instance_FunctionAPI { int32_t index) = 0; // FlashFullscreen. + virtual PP_Bool IsFullscreen(PP_Instance instance) = 0; + virtual PP_Bool SetFullscreen(PP_Instance instance, + PP_Bool fullscreen) = 0; + virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) = 0; + + // FlashFullscreen. virtual PP_Bool FlashIsFullscreen(PP_Instance instance) = 0; virtual PP_Bool FlashSetFullscreen(PP_Instance instance, PP_Bool fullscreen) = 0; |