RE: Setting plugin activation state from addons

"Marcin Pijanowski" <[email protected]> Tue, 11 Mar 2014 15:40:40 +0100
Newsgroups gmane.comp.mozilla.devel.plugins
Message-ID <[email protected]>
OK. Thanks.

Is there any version of mozilla where I can check whether the solution
works?
Is http://www.mozilla.org/aurora/ suitable for testing ?

-----Original Message-----
From: dev-tech-plugins
[mailto:dev-tech-plugins-bounces+marcin.pijanowski=comarch.pl@lists.mozilla.
org] On Behalf Of Georg Fritzsche
Sent: Tuesday, March 11, 2014 3:31 PM
To: [email protected]
Subject: Re: Setting plugin activation state from addons

. and Benjamin brought up the good point that addons should use
EXPIRE_SESSION instead of EXPIRE_NEVER, as otherwise we get stale data when
it is disabled or uninstalled.

On 11 Mar 2014, at 13:02, Georg Fritzsche <[email protected]> wrote:

> Hi,
> 
> some plugins are delivered to Firefox via XPIs. If you do that, you 
> can add per-site or global permissions for your plugin and don't 
> require any white- listing.
> 
> While we don't have docs yet on the subject, here is an outline i put 
> on bug
> 982028:
> 
> For adding the permissions (per site, preferred if possible) you would 
> use
> nsIPermissionManager.add() for every mimetype [1].
> * for the type param use nsIPluginManager.getPermissionStringForType().
> * the permission param should be Ci.nsIPermissionManager.ALLOW_ACTION
> * expire type Ci.nsIPermissionManager.EXPIRE_NEVER or  
> Ci.nsIPermissionManager.EXPIRE_TIME
> 
> You can see similar usage to that in our click-to-play code and check 
> permissions.sqlite in your profile folder [2].
> 
> Globally activating (avoid if possible to reduce exposure) a plugin 
> would be done via prefs, you can check about:config and filter for
"plugin.state." for comparison.
> 
> 
> Georg
> 
> 
> [1] 
> https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsI
> PermissionManager#add%28%29 [2] 
> http://hg.mozilla.org//mozilla-central/annotate/67485526e241/browser/b
> ase/content/browser-plugins.js#l729
> 

_______________________________________________
dev-tech-plugins mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-plugins