Event for chrome extension installation?

1,747 views
Skip to first unread message

mallyvai

unread,
Jul 7, 2010, 7:44:15 PM7/7/10
to Chromium-extensions
I was wondering if there was any event that fired when the user was
attempting to install a new extension - I wanted to try and augment
the existing "This Extension Needs Access To" dialog with some more
comprehensive information - maybe just a pretty-printed dump of the
manifest itself, to start.

A related question - is there some list that enumerates all possible
available events?

Mohamed Mansour

unread,
Jul 7, 2010, 8:02:24 PM7/7/10
to mallyvai, Chromium-extensions
I believe a couple of users asked this question on the mailing list, if you search you will find out more detail. As well, I have answered this question on http://stackoverflow.com/questions/2399389/chrome-extension-first-run/2401788#2401788

Basically, you can use localStorage to keep track of a variable, if that variable is not set, you can assume the extension has been installed. It is nice to store the version in that localStorage because you can figure out when an extension has been installed or updated. 

-
Mohamed Mansour
m...@chromium.org



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Vaibhav Mallya

unread,
Jul 8, 2010, 12:40:10 AM7/8/10
to Mohamed Mansour, Chromium-extensions
To clarify my question, is there an event that triggers when *any*
extension is being installed? The form of examination you suggested
seems useful, but only as far as an extension checking itself is
concerned.

Mohamed Mansour

unread,
Jul 8, 2010, 10:16:10 AM7/8/10
to Vaibhav Mallya, Chromium-extensions
There currently is no way to do this with the current extension API. But maybe you can create a directory listener using NPAPI that listens in your extension directory. If a new folder is created, that means an extension is called. The name of the folder is the extension id.

-
Mohamed Mansour
m...@chromium.org

Vaibhav Mallya

unread,
Jul 8, 2010, 11:46:59 AM7/8/10
to Mohamed Mansour, Chromium-extensions
Reply all
Reply to author
Forward
0 new messages