I am trying to develop extensions for chrome and firefox that will communicate with my main program. I have developed a native library for the communication and in the extensions I just need to load the dll and call a method.
For Firefox I have no issue. I did it easily using ctypes.open("mydll.dll");
But for Chrome, as far as I know, currently there is no way to do that. because in one hand NPAPI is being phased out and in the other hand NaCI/ppapi runs in a sandbox.
Am I missing something or it's really impossible?
Thanks in advance.
You probably should create an exe that wraps your DLL and then register it as a Native Messaging host. In your exe, you would parse the JSON sent from Chrome and convert it into variables that you pass to methods in the DLL.
Native Messaging is the recommended solution for an extension that needs to communicate with an application.