Chrome Extension: Save file and start and external application - google-chrome

I need to develop a cross-platform Google Chrome extension that takes the inner HTML of the current page and saves it to the hard drive, and then launches an application that would process that file.
Is there any way to do this?
I've looked at the NPAPI, but does it require that I create a .DLL? If so, that doesn't seem like it would easily be portable to other operating systems.

To launch an application, you can only use NPAPI.
NPAPI is available in all operating systems (Linux - so, Mac - plugin, Windows - dll). If you want to make your Chrome Extension cross platform, you would need to write a NPAPI plugin for each operating system.
In your manifest you define them all inside, when the extension loads, it will scan the plugin array in your manifest one at a time, and only loads the ones that is for your system.
www.firebreath.org is a cross platform plugin framework.

Related

install chrome extension outside the chrome extension market

As I know you can install an extension outside the market without expected limitations, for example, autoupdate. You need to be in develop mode.
You can read this thread to understand the problem:
Install chrome extension as external extensions
The think is, anyone know another way to install an extension in your chrome (internal use in a company o class). I like to think that I can sign the extension with a shared certificate or something like that. And send the extension to the users.
Google no longer allows it.
Protecting Chrome users from malicious extensions
Continuing to protect Chrome users from malicious extensions
There are 4 types of extension install still available:
Direct installation from Webstore or inline install from a website, but hosted on Web Store.
Indirect installation through registry manipulation (e.g. companion extension for a native app), but it still must be hosted in the Webstore.
Local development installs; will nag on every Chrome restart and no autoupdate mechanism.
For Enterprise only, policy-based installs. Note that on Windows that requires computers joined to a domain. In this case there are no restrictions on where the extension is hosted.

Can I deploy an HTML5 application using the WebAppRT executable?

I see that the lastest versions of Firefox come with a webapprt.exe and webapprt-stub.exe executable. I think that they are for the Open Web Apps system but I would like to know if it's possible to use the WebAppRT container with external made applications. I mean that I could distribute the WebAppRT executable, the shared libs required and my HTML files and deploy it offline without having Firefox installed.
Why?
What do you mean by "external made applications"?
Why don't you just create a web app as explained in Building Web apps - App Center | MDN ?
It will take care of the details and allow your app to reach more platform than doing it manually. For a glance see Platform-specific details of app installation - App Center | MDN
You don't have to do anything special to install apps on different platforms. All the information you need to provide, such as the app name, is contained in the app manifest. Here are some platform-specific details about how apps are installed on each platform. These details assume that Firefox has been installed on the platform.
To make that path easier, you can follow tutorials or clone an existing open-source web app that has something in common to see how it's done.
What did you mean?
If you mean to just manually locally install a some app that you write, the simplest thing to do would be to install any app, look at what's been done and replicate the steps with your app. But what's the point?
My guess is: it will work only if the local OS has a platform to actually execute the app. Then that platform will also be able to install the app properly. So, it will be simpler to you to just make a regular web app and have it installed through standard means.
Or were you thinking of something else?

Standalone chrome applications

Currently I am exploring the possibilities and features of Google Chrome apps. As I see to run chrome apps we need to distribute them through chrome App Store. Could we develop a application as a chrome app, which will not need to release to general public or for a limited audience?
Is there anyway that we could package it to native OS executable like .exe in windows or .app in MacOS. So for users who doesn't have chrome installed will also can without any issue. Or at least could we distribute without submitting it to the App Store.
Also I am wondering whether we can run another application through chrome apps? For example I am planing to develop a java application and start with the chrome app.
You can distribute a Chrome App without using the Chrome Web Store, but you'll have to explain to users how to install it, and it's a little tricky: They have to open the Extensions window in Chrome and then drag the installation file to that window. Upon dropping it, there will be a dialog asking them if they want it installed. (They can't just double-click on a file or do anything else that's easy like that.)
Chrome Apps can't directly launch native apps, but they can communicate in various ways with native apps (or any apps) once those other apps are running.
(Some parts of your question are ungrammatical, so I can't be completely sure what you're asking, but the above is what I think you're asking.)
Chrome Extensions are only installable from the Web Store, but Applications can be privately hosted with some provisos: https://developer.chrome.com/extensions/hosting

How to access system resources in Chrome Extensions

I am developing a chrome extension which needs to fetch some configuration from a system file... Earlier chrome provided NPAPI plug-ins, which could access any system resource (win registry, file system, IPC calls etc...)
However knowing that NPAPI will be discontinued soon, i am looking for alternatives.. one of the ways to build a plug-in is using Pepper clients, but pepper clients read/write only to chrome local storage.. which looks like a more data version of cookies...
So is there any other alternative to access system resources (like registry, files etc) in chrome extensions now??
The suggested alternative to NPAPI for many cases is "Native Messaging", where you provide an installer to users which adds binary code that chrome can communicate with via message passing. See http://developer.chrome.com/extensions/messaging.html#native-messaging.
For file access, in packaged apps there is the fileSystem API that lets you get access to the actual (non-sandboxed) filesystem. See http://developer.chrome.com/apps/fileSystem.html.

File browser access to Chrome's sandboxed filesystems

I'm writing a Google Chrome app that stores things locally with the HTML5 FileSystem API. Is there any way to use Windows Explorer to get to the directory where Chrome stores these files or is it entirely virtual and inaccessible from outside the app? I haven't been able to find the directory by poking around nor have I seen any reference online to it.
I suppose I could just write something within the app to allow me GUI management of the files my app stores or just use the developer console, but it would really be a time saver to use WE.
Nevermind, I just found it. For anyone looking, it's in (on my windows 7 machine at least)
C:\Users\ user \AppData\Local\Google\Chrome\User Data\Default\File System
Also note that this was in Chrome 11, in Chrome 13 there were some changes to the FileSystem (probably for security) that make it very difficult to find specific files by scrolling through the files in Chrome's AppData space.