NPAPI plugin not showing approximately: plugins in Google Chrome

I have discussed questions on this forum about these questions, but I have not found any queries related to the question I am facing. I wrote an NPAPI plugin that works fine with GtkLauncher (comes with webkit) and firefox, but with google-chrome (18.0.1025.151) the plugin doesn't even show up in: plugins. I am working on Ubuntu 10.10.

When I load the plugin in google-chrome, in the browser, I cannot load the plugin, but nothing is displayed in the console. I doubt if my function calls NP_Initialize.

Here is the NP_Initialize code:

-------------------------------
NPError OSCALL
NP_Initialize(NPNetscapeFuncs *npnf
#if !defined(_WINDOWS) && !defined(WEBKIT_DARWIN_SDK) 
    , NPPluginFuncs *nppfuncs)
#else
)
#endif

{
MEDIA_DEBUG_PRINT("\nwcf Media plugin: NP_Initialize");
    if(npnf == NULL)
        return NPERR_INVALID_FUNCTABLE_ERROR;
    if(HIBYTE(npnf->version) > NP_VERSION_MAJOR)
        return NPERR_INCOMPATIBLE_VERSION_ERROR;

    npnfuncs = npnf;

    #if !defined(_WINDOWS) && !defined(WEBKIT_DARWIN_SDK)
        NP_GetEntryPoints(nppfuncs);                            
    #endif

    return NPERR_NO_ERROR;

}

NPError OSCALL
NP_GetEntryPoints(NPPluginFuncs *nppfuncs) 
{

    MEDIA_DEBUG_PRINT("\nwcf Media plugin: NP_GetEntryPoints"); 
    nppfuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR; 
    nppfuncs->newp = nevv; 
    nppfuncs->destroy = destroy; 
    nppfuncs->getvalue = getValue; 
    nppfuncs->event = handleEvent; 
    nppfuncs->setwindow = setWindow; 

    return NPERR_NO_ERROR;
}

      

I know there is a cross-browser Firebreath framework that I plan to use, but currently I need my plugin to work in chrome.

Can anyone help me solve my problem?

Thanks and Regards, Souvik

+3


source to share


2 answers


Chrome tends to be a little savvy about how things start. I don't see anything here that could lead to your problem, but Chrome is known for rejecting plugins that don't behave the way they expect. Most likely your problem is later; you say you doubt your NP_Initialize is getting called, if I were you I would confirm it. Ask him to write the file / tmp / or do something.

Also you have not specified any of your other entry points like NP_GetPluginVersion or NP_GetMimeDescription. They are also required for the linux plugin and can be very responsible for such a problem. Check out the FireBreath X11 entry point file for reference .



Finally, it is possible that the way you installed the plugin is found by mozilla and not chrome; how did you install it?

+3


source


If your plugin doesn't show up in chrome: // plugins then it won't work during the initial plugin scan. Try running with the flag --debug-plugin-loading

that the log statement should give you at the point where your plugin registration fails.



+2


source







All Articles