예제 #1
0
static jclass anp_loadJavaClass(NPP instance, const char* className) {
    WebCore::PluginView* pluginView = pluginViewForInstance(instance);
    PluginWidgetAndroid* pluginWidget = pluginView->platformPluginWidget();

    jclass result;
    result = pluginWidget->webViewCore()->getPluginClass(pluginView->plugin()->path(),
                                                         className);
    return result;
}
static ANativeWindow* anp_acquireNativeWindow(NPP instance) {
    WebCore::MediaLayer* mediaLayer = mediaLayerForInstance(instance);

#ifdef MTK_WEBKIT_FIX
    WebCore::PluginView* pluginView = pluginViewForInstance(instance);
    PluginWidgetAndroid* pluginWidget = pluginView->platformPluginWidget();

    pluginWidget->startEmbeddedVideoStreaming();
#endif // MTK_WEBKIT_FIX

    return mediaLayer->acquireNativeWindowForVideo();
}
static WebCore::MediaLayer* mediaLayerForInstance(NPP instance) {
    WebCore::PluginView* pluginView = pluginViewForInstance(instance);
    PluginWidgetAndroid* pluginWidget = pluginView->platformPluginWidget();
    return pluginWidget->getLayer();
}