Should I sign the Chrome Extension or NPAPI plugin? - google-chrome

I am packing a NPAPI plugin into a Chrome extension.
My doubt here should I code-sign the NPAPI plugin or the Chrome extension?

Part of the process of making the package is that the zip file (this is what a crx is) is signed. See http://developer.chrome.com/extensions/crx.html for more details.
This should mean that the download you get from the store can be verified. It does not mean however that once installed that the contents on the disk have not been modified - crx's are unpacked once they are installed and once unpacked the user could manipulate them. So if you are concerned that the NPAPI could be tampered with once installed then you would have to look in to how to do that.

Related

Can I pack chrome a standalone installation package(exe/dmg) with some specific extensions in it

I developed a chrome extension to solve a specific problem. I'm going to distribute it. But I dont want to my user down a chrome then install a extension and change chrome setting in order to unforbid my extension.
I'd like to pack the whole thing into one installation execution. Users just need to download the installation program, install it, then they get a special chrome with my extension on it. Everything is done.
How can I do this?

How install custom pepper plugin in Chromium browser source code?

I need to build in my pepper plugin in chromium source code for building browser with already installed plugin. Is there possibility to do that?
A handful of plugins are built in. Since these are plugins, they are built independently from Chrome and loaded dynamically rather than directly linked to the Chromium executable. This is the function that causes them to be loaded into Chromium:
https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/chrome_content_client.cc&rcl=1436599777&l=118
The NaCl plugin is special, since it runs "in process", which means it is loaded into the renderer process. Eventually, support for this kind of plugin will be eliminated, so it is best to follow the pattern of the "out of process" plugins, which run in their own process, such as PDF.

How to deploy a simple NPAPI plugin DLL in Mozilla Firefox (v29.0.1) in Windows?

I downloaded "npsimple" NPAPI plugin for Mozilla from the link "https://code.google.com/p/npapi-chrome-plugin-helloworld-example/source/browse/trunk/samplevsproject/?r=2"
I was able to build it fine and run the plugin code in Chrome by packing the "npsimple.dll" as Chrome extension (.crx) and run it Chrome browser.
But I wasn't able to deploy the same NPAPI plugin "npsimple.dll" in Mozilla Firefox. I tried keeping the dll in mozilla firefox's installation folder under "plugins" folder, and restarted the browser. It did not help.
Could someone give some pointers on how to go about deploying NPAPI plugin dll in Mozilla Firefox?
I tried the following ways, but it didn't work.
I tried doing it by writing a plugininstall.reg file having following content inside it and imported the file in regedit window. Then I restarted Mozilla Firefox and it didn't work,
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins\#somecompany.com/npSample,version=1.‌​0.0.1]
"Description"="A sample plugin"
"Path"="D:\\Projects\\Browser_Plugin_Development\\NPAPI_Samples\\npapi_vs2008\\npsimp‌​le\\Debug\\npsimple.dll"
"ProductName"="npsimple"
"Vendor"="somecompany"
"Version"="1.0.0.1"
Even I've tried keeping the npsimple.dll plugin under Mozilla's plugins directory "C:\Program Files\Mozilla Firefox\plugins" and that too didn't help.
Thanks,
Prem
The page you want is on the mozilla wiki.
Here is what you need to do: (quoted from that page)
Windows Installation Using the Registry
On Windows, plug-ins should be installed to a plug-in-specific directory such as C:\Program Files\Plugin Name\nppluginname.dll. Then the following registry values should be added to the Windows registry (the plug-in-identifier should follow the specification):
HKLM/Software/MozillaPlugins/plugin-identifier
Descripton: REG_SZ "Description of the Plugin"
Path: REG_SZ "C:..Path to the plugin.dll"
ProductName: REG_SZ "The Plugin Name"
Vendor: REG_SZ "The Plugin Author/Vendor"
Version: REG_SZ "0.5.whatever plugin version string"
-
HKLM/Software/MozillaPlugins/plugin-identifier/MimeTypes
Add a sub-key for each MIME type the plugin supports, with no values
It is worth noting that you can also use HKCU, though note that when doing both 32 and 64 bit versions HKCU doesn't support the SysWOW32 virtualization that HKLM does. (If that means nothing to you then you can probably ignore it)

Any workaround for NPAPI nor working on Chrome 32

Chrome 32 has blocked NPAPI for extension development.
I wonder if there is any workaround for enable this feature in Chrome, like some settings or launch args.
The only thing that should have changed for extensions so far is that you can't post new extensions that include NPAPI plugins to the store. There's no setting or flag that you can use locally that would make the store policy not apply to you.
If you are seeing plugins in existing extensions not working correctly in 32, you should file a bug.

Standalone version of Chrome (for development)

I use the stable version of Google Chrome as my default browser on my system. I now need to work on a project requiring the development version of Chrome, yet I do not wish to replace my system install of Chrome.
Does there exist a standalone package of Chome which can be unpacked into a folder and executed entirely from there? Ie, it should not require anything to be installed, it should not touch the profile associated with my installed version of Chrome. I should be able to download different versions of this into different folders, and be sure that they do not conflict with each other..
(Ideally we could package up prototype builds complete with a copy of this version of Chrome. These packages would then be as self contained as a desktop application...)
You could download the Chromium flavour (which is the open source browser that runs Google Chrome). You can download the latest and greatest from:
http://build.chromium.org/buildbot/continuous/LATEST/
If you have specific dates/revision that you want to download, you can pick them from:
http://build.chromium.org/buildbot/continuous/
That will not interfere with the current version of Chrome, instead it will be using Chromium folder structure (chrome replaced with chromium everywhere).
Simply get the portable version, it does what as you need.
As an answer above, you could get Chromium (portable) which also includes chromedriver from chromium snapshots page.
Pick one with the biggest number (scroll down):
https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win_x64/
If the link is dead, there is always a solution to build it from source code, it's a benefit of open source application.
https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/windows_build_instructions.md#Build-Chromium
Chromium home page:
https://www.chromium.org/
Hope it helps!
I believe Chrome on Windows installs itself into the Application Data (/Users on Win7) folder of a user. While I can't test this at the moment, try creating a new user account, install Chrome, then log into your other account. Then try running both at the same time. Might be a bit hard to find the executable.
Another option would be to run it in a VM. More expensive versions of Win7 have this somewhat built-in (you need to download an XP image from Microsoft, but the VM software is pre-installed, I think) but you can also install VirtualBox + your own ISO. On a decent computer system, you shouldn't get too much of a performance hit.
A really silly way of doing this is installing the multiple concurrent users Remote Desktop hack, Remote Desktopping to your own computer (if that's possible) and running the second Chrome install as a different user.