views:

24

answers:

1

I need to write a Chrome extension that gets notified everytime a download is initiated or about to begin. The extension also needs to be able to prevent the download from continuing.

I tried searching everywhere for ways to do this... but I wasn't getting anywhere.

How would I go about doing this? Is there some function I can call to register a callback?

+1  A: 

Hi George,

You cannot do that, there is currently no API that hooks up to the download manager. There were talks about adding an API, but no plans were announced just yet.

I don't know if you can use NPAPI. But here is the issue on the tracker if you want to be notified when the Downloads API will be developed: http://code.google.com/p/chromium/issues/detail?id=12133

Mohamed Mansour
Thanks for clearing this up. Hope they add that functionality soon.
George Edison