Search code examples
google-chromegoogle-chrome-extensiongoogle-nativeclient

Chrome extension to launch on file open


I'm about to start a Chrome packaged app project which will include a NaCl component to parse CHM files. But before I start, I just want to check if it's possible to get the app to automatically launch when a CHM is opened (when the users clicks on a link to an chm file, or possibly if a chm file is dragged into a Chrome window).

I've come across some Google documentation here which describes associating NaCl modules with MIME types in the extension manifest, but A: I'm not sure if this is relevant to my problem and B: I've tried doing as it describes, but nothing seems to change.

If anyone can point me in the right direction, I'd appreciate it!


Solution

  • I was able to hack around with chrome.webRequest to filter URLs with .chm extensions, but of course that only works when a user clicks on a direct link to a CHM file, and there is no way I know of to access local files outside the sandbox (for good reason no doubt).

    I have since decided to make the project a Drive app with the C++ portion squirreled away inside a DLL on an ASP.net server, which makes a lot more sense to me.