Bug 1148149 - Support Android Presentation API. r=snorp, r=jgilbert

This commit is contained in:
Randall Barker
2015-04-10 22:14:00 -04:00
parent 983be4c745
commit c2f98c668e
15 changed files with 517 additions and 1 deletions

View File

@@ -811,6 +811,27 @@ cleanup:
return surfaceBits;
}
NS_EXPORT void JNICALL
Java_org_mozilla_gecko_GeckoAppShell_addPresentationSurface(JNIEnv* jenv, jclass, jobject surface)
{
if (surface != NULL) {
void* window = AndroidBridge::Bridge()->AcquireNativeWindow(jenv, surface);
if (window) {
AndroidBridge::Bridge()->SetPresentationWindow(window);
}
}
}
NS_EXPORT void JNICALL
Java_org_mozilla_gecko_GeckoAppShell_removePresentationSurface(JNIEnv* jenv, jclass, jobject surface)
{
void* window = AndroidBridge::Bridge()->GetPresentationWindow();
if (window) {
AndroidBridge::Bridge()->SetPresentationWindow(nullptr);
AndroidBridge::Bridge()->ReleaseNativeWindow(window);
}
}
NS_EXPORT void JNICALL
Java_org_mozilla_gecko_GeckoAppShell_onFullScreenPluginHidden(JNIEnv* jenv, jclass, jobject view)
{