0

I have a NPAPI plugin , running fine in firefox. Now i want to port it to chrome browser, means i want it to work in chrome also. But i have learnt after browsing on internet and many links that chrome no longer supports NPAPI rather now it supports pepper API and now there is concept of native client.

What i have developed an understanding so far is that if i replace the NPAPI code(made for plugin for firefox) with the Pepper API code and upon compilation, a pexe file(native client module) along with manifest file(which is referring to the location of the pexe file) would be generated which would be kept on the server. when an html page having embed tag describing a particular MIME type, say "application/x-pnacl" is loaded, then via src attribute(referring to the manifest file) of embed tag, manifest file is fetched which then fetches the actual pexe file which is then run by/within the native client plugin(already present in chrome).

I am not sure whether this understanding is correct or not. I was assuming that just like firefox plugin, pexe file would be stored and installed on local user PC and then detected/loaded by chrome as a plugin. Please tell whether this is correct or not.

Also, I want to ask whether still there exist any way to run NPAPI plugin in chrome or not. If it is please tell otherwise i should not think about it.

user2181750
  • 241
  • 5
  • 15
  • I have a chrome plugin with NaCl, which provides encryption decryption APIs to encrypt or decrypt my request in chrome extension, I am developing a firefox add-on which does the same job. But here NaCl is not supported by firefox. how can I embed pexe file in firefox addon background.js – Shivanshu Goyal Sep 13 '17 at 11:26

1 Answers1

2

First, Chrome no longer supports NPAPI plugins for security reasons: https://support.google.com/chrome/answer/6213033?hl=en

Plugins must use the Pepper Plugin API (PPAPI) and be compiled as Native Client (NaCl) executables so the plugin binary can be validated as safe to run. Portable Native Client (PNaCl) plugins can be loaded by any web page without the user installing anything. However, if your plugin is large, you may want to distribute it as a Web Application through the Chrome Web Store. In that case, you can bundle your .nexe's or a .pexe with your application so it is effectively installed on the user's machine.

This link describes how you can distribute your plugin: https://developer.chrome.com/native-client/devguide/distributing

bbudge
  • 1,127
  • 6
  • 7
  • This answer is correct; also note that there are significant differences between NaCl and NPAPI; the security model is completely different. You can of course manually re-enable NPAPI on chrome, but that will only work for a short time more as Chrome will be completely removing support soon. Whether this is a good solution depends on your plugin; it may be better to do something with Native Client, which is the route FireBreath 2.0 takes; NaCl has better drawing, Native Client has the "out of browser" security model. What you use depends on your needs – taxilian Aug 28 '15 at 14:31
  • @bbudge and taxilian, hi! thanks for your answer. I have understood that pexe file can be stored and installed on user local machine as a plugin. But i have a doubt that when pexe is installed as a plugin , would then it be shown as a seperate plugin in chrome://plugins path, like Adobe Flash Player plugin is shown? – user2181750 Aug 30 '15 at 13:39