NPAPI plugin does not work in Google Chrome

I wrote a small NPAPI plugin using the old Mozilla NPRuntime example as a base. My problem is that it works fine on Firefox and Safari (on Windows), but it does not work with Google Chrome.

I see a plugin: about plugins it’s just fine, and I see that Chrome starts a new plugin launch process when a test page is opened, the plugin process dies after ~ 10 seconds without any error dialog box. The process is active for 10 seconds, access to the object of plugins for scripting does not work (which works fine when using Firefox or Safari).

Any ideas that could get Chrome to kill the plugin process in 10 seconds? There must be something related to initialization, because it kills it, even if I don’t get access to the plugin at all.

+5
source share
2 answers

It's hard to say for sure, but you can use the -plugin-startup-dialog command-line option to make Chrome pop up when it loads the plugin in the same process. Then you can attach the debugger to this process and hopefully catch the error.

FireBreath , , - , FireBreath Chrome. , , , . , NPP_New, NPP_Destroy NPP_SetWindow, , .

Chromium ( , ), , .

!

+15

Taxilian , , Chrome NP_Initialize(). , , NPNetscapeFuncs, , , . , Chrome 19 , , , 22 Mozilla XUL Runner SDK, npapi.h npruntime.h.

+5

All Articles