Search code examples
linuxgoogle-chromenpapi

NPAPI and Google Chrome on Linux


I'm working on an NPAPI plugin on Linux and have run into several issues with Google Chrome (albeit it works perfectly on Firefox).

Firstly, the plugin execution would hang and after a long harrowing time I figured out that the call to NPN_Evaluate hangs when the last parameter (for the returned result) is NULL. It works on Firefox fine. The solution was to pass the address of an NPVariant type variable as the parameter and just ignore the value.

After that the plugin loads fine but I'm stuck with this error message: [8886:8886:195170759489:ERROR:webkit/glue/plugins/webplugin_delegate_impl_gtk.cc(129)] Not implemented reached in bool WebPluginDelegateImpl::WindowedCreatePlugin() windowed plugin but without xembed. See http://code.google.com/p/chromium/issues/detail?id=38229

Any ideas on how I could get this plugin working?


Solution

  • You need to use XEmbed in your plugin to work with Chrome. Docs here: https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins

    FireBreath uses this method: http://firebreath.org

    it is open source (BSD license), so you could either use it with your plugin or you could shamelessly "borrow" the code for xembed.