Ready-to-use NPAPI-Plugin to launch external application? - google-chrome-extension

I need to launch an external application from a Google Chrome extension. I need to pass a few parameters from javascript, wait until the external application is done and then use its output in javascript.
I did some reading and this should be possible using an NPAPI plugin (I only care about Windows so far).
Since my C/C++ got very rusty over the years and my requirements are quite simple I was wondering if somebody knows about a ready-to-use NPAPI DLL that does just the one thing I need: Launch an EXE with several parameters and return its output?
I tried Google of course, but didn't find anything. Thanks a lot.

It should be rather easy to write such a plugin in C++ with Firebreath. Writing a NPAPI plugin from scratch can be tricky, but luckily Firebreath abstracts away most of the details and makes it much easier.
As a plus, if you base the plugin on Firebreath, in addition to NPAPI on Windows you pretty much get free support for NPAPI on Mac/Linux and ActiveX on Windows.
http://www.firebreath.org

Related

Where to start in building a chrome extension

Im looking to get more into programming, and I've decided to look into creating a browser extension. This is exactly the kind of project I've been looking for to get stuck into programming web stuff but I'm new to it so I don't know where to start.
Could anyone suggest the different things I should look into?
The only programming experience I have so far is in Matlab. I've looked into C on and off in the past I but I have no practical experience with it.
I've started to have a look at Twando, an open source program which schedules tweets on Twitter where I'm going through and understanding all the code for that program (mostly php).
Afterwards I'll look more carefully at how to write Chrome browser extensions and then probably look into how to make 3rd party programs work with Twitter, Pinterest etc.
Am I looking along the right lines? Any constructive criticism will be appreciated.
I think you could do this using Javascript (and maybe JQuery, which is a library for Javascript that makes it easier/adds alot of easy to use functions).
For the basics:
http://developer.chrome.com/extensions/getstarted
This is great for learing to work with JSON and chrome extensions:
http://lifehacker.com/5857721/how-to-build-a-chrome-extension
What you could also do is download a simple extension from the "store" and open it to check what's inside. This helped me the most with learning Javascript and JQuery.

Host firebreath plugin in Node.js

I have created a browser plugin based on Firebreath framework. Now I want to load the plugin into Node.js and make the javascript code communicate with the plugin. My draft idea is creating a Node.js C++ add-on to wrapper the plugin. Node.js loads the add-on. The add-on loads the plugin. The function call between the javascript code and the plugin code is via the add-on.
I want to consult the experts before moving ahead. Does anyone have the experience to make the node.js script communicate with firebreath plugin? Is my idea possible? Please share more details.
Thanks,
Jeffrey
It's certainly possible, but it may be more trouble than it's worth. What I'd probably do instead is try to abstract out the JSAPI stuff (ScriptingCore project) and make an adapter that wraps a JSAPI object with a node object. Actually loading the full plugin as-is would require a lot of work. It's doable, but it would be a bit of a pain.
... I wrote FireBreath, so I do know what I'm talking about =]

Development environments for google-chrome-extension

Currently I am coding my google-chrome-extensions using a combination of notepad and the chrome console. I am 100% sure that there is a better way of programming these extensions. What environments are people using?
I'm using Notepad++ which works beautifully.
You might consider trying the crossrider beta to build cross-browser extensions. I've found the experience on Chrome superb so far.
Your preferred IDE (eg. NetBeans) and Google Chrome (you have to test on something, right?).
You might want to check:
NetBean 7.0 (They have a great version for web development that let you write HTML,CSS and JS with all the great code sniff/highlight/complete stuff)
Eclipse got some good version for web dev (PDT and others).
Notepad++ , UltraEdit, TextPad or any other good editor you like.
As for the debug, profile and test mode - you have the developers tool in Chrome that are excellent. You might want to check out this short video that give lots of useful tips:
http://www.youtube.com/watch?v=nOEw9iiopwI
Good luck!

Google Chrome extensions

Is there way to run native C/C++/Obj-C within a google chrome extension, The official page says extension are like other web pages, as i see it there is no way except Native Client(NaCl). Is this technically possible.
I believe that you are looking for NPAPI plugins. Do not take lightly the warning, however:
NPAPI is a really big hammer that should only be used when no other approach will work.
Why does your extension need C/C++/Objective-C, exactly?
Re: OP comment
Check out this question!

Running C# app inside browser as a plugin

I have a small 2D game engine written in C#, using DirectX. Is it possible to somehow run it in a browser as a plugin? Like for example Flash and others, where you go to a site with a game and it will ask you to install a certain plugin and then you can play the game in the browser, with mouse and keyboard input.
I have searched around for hours and I still don't know what I'm looking for. I have so far primarily focused on Internet Explorer, but there are plugins, addons, extensions, etc I don't know what I need really.
Yes I think it is possible.
For example, I have an HTML page which includes an element like this:
<object id="simpleControl1"
classid="http:RenderTextProject5.dll#RenderTextProject.ScrollableControl"
height="300"
width="300">
</object>
The 'classid' attribute value has the following meaning/syntax:
RenderTextProject5.dll is the filename of a compiled .NET assembly
RenderTextProject.ScrollableControl is the qualified name (namespace plus classname) of a class which subclasses System.Windows.Forms.Control
I can then see the control being rendered in the browser.
I'm using IE (IE8, but it used to work with IE6 too), and I have the .NET framework installed on my machine (but I think I needn't have the RenderTextProject5 assembly installed on the client machine).
There may be some other caveats too (e.g. I needed to run in the Intranet security zone).
See Return of the Rich Client: Code Access Security and Distribution Features in .NET Enhance Client-Side Apps.
Look for Silverlight.. It is maybe not exactly what you need but it is a browser plugin capable of running C# code ;)
There is a relatively new plugin called Unity. It is a bit more complex, as it is a dev/3D authoring environment on its own, but uses C# as its language as far as I know. However I don't know if pure 2D programming is possible (well, may be worked around using ortho 3d?).
The basic version is free to download recently, maybe worth a check.
It is possible to run C# applications in a web browser without using plugins. For example, C# applications can be compiled into JavaScript applications using JSIL.

Resources