0
votes

I have a extension, which uses XPCOM in Firefox to work. Now I would like to port that one to Chrome. Since the only way to use it is by using npapi and npruntime, I think I have to rewrite at least all the glue.

To keep as much of the sourcecode as possible, I was thinking of writing a idl converter similar to the header.py in Mozilla. Has this already been done and/or are there any resources for the switch from XPCOM to NPAPI?

1
XPCOM support for plugins has been gone for a while - do you have an extension?Georg Fritzsche
Sorry for the confusion, yes, it is a "extension".abergmeier
So you want to port an XPCOM-based extension to a Chrome extension, which might need an NPAPI plugin for native calls? Or what do you think you need NPAPI for?Georg Fritzsche
@GeorgFritzsche I do know, that I need native calls ;)abergmeier

1 Answers

1
votes

There is only one "glue" generator that I know of for NPAPI, and that is nixysa. If it were me, though, I'd just go ahead and port it to FireBreath; likely it wouldn't be any harder than porting it to straight npruntime and you'd then be able to take advantage of all the tweaks and fixes that an active community has found for different browsers, as well as potentially use it in other browsers.

I've been around in the plugin world for awhile, though, and I have never seen anything that converts a XPCOM .idl to one of the other formats; I don't think it'd be all that difficult to create such a thing, but I doubt many would need it at this point.

Hopefully something there helps.