Pass more than one permissions to prompt dialog.

2013-09-04 Thread ayang
Hi,
I'm working on bug 853356 which requires to pass new permissions 
'audio-capture' and 'video-capture' together to permission prompt dialog via 
getUserMedia.

My current implementation is to replaced the string 'type' [1] with a string 
array 'types'.

 interface nsIContentPermissionRequest : nsISupports {
-   */
-  readonly attribute ACString type;

+  void types([optional] out unsigned long aLength,
+ [array, size_is(aLength), retval] out wstring aTypes);

However, it introduces concerns to pass 2+ permissions in a request [2].

What do you think about it?
Any suggestion is welcome. Thanks.


[1] http://dxr.mozilla.org/mozilla-central/source/dom/interfaces
/base/nsIContentPermissionPrompt.idl
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=853356#c54
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Pass more than one permissions to prompt dialog.

2013-09-04 Thread Alfredo Yang
cc :dougt and :roc.

- Original Message -
From: ay...@mozilla.com
To: dev-platform@lists.mozilla.org
Sent: Wednesday, September 4, 2013 7:34:51 PM
Subject: Pass more than one permissions to prompt dialog.

Hi,
I'm working on bug 853356 which requires to pass new permissions 
'audio-capture' and 'video-capture' together to permission prompt dialog via 
getUserMedia.

My current implementation is to replaced the string 'type' [1] with a string 
array 'types'.

 interface nsIContentPermissionRequest : nsISupports {
-   */
-  readonly attribute ACString type;

+  void types([optional] out unsigned long aLength,
+ [array, size_is(aLength), retval] out wstring aTypes);

However, it introduces concerns to pass 2+ permissions in a request [2].

What do you think about it?
Any suggestion is welcome. Thanks.


[1] http://dxr.mozilla.org/mozilla-central/source/dom/interfaces
/base/nsIContentPermissionPrompt.idl
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=853356#c54
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Pass more than one permissions to prompt dialog.

2013-09-04 Thread Robert O'Callahan
On Wed, Sep 4, 2013 at 11:34 PM, ay...@mozilla.com wrote:

 I'm working on bug 853356 which requires to pass new permissions
 'audio-capture' and 'video-capture' together to permission prompt dialog
 via getUserMedia.

 My current implementation is to replaced the string 'type' [1] with a
 string array 'types'.

  interface nsIContentPermissionRequest : nsISupports {
 -   */
 -  readonly attribute ACString type;

 +  void types([optional] out unsigned long aLength,
 + [array, size_is(aLength), retval] out wstring aTypes);

 However, it introduces concerns to pass 2+ permissions in a request [2].

 What do you think about it?
 Any suggestion is welcome. Thanks.


I think this makes sense when multiple permission requests are triggered by
the same user action. So I think your current approach is fine, assuming it
does what ekr said in
https://bugzilla.mozilla.org/show_bug.cgi?id=853356#c55. I don't see any
real downside.

That is not the same as what I think Doug meant in
https://bugzilla.mozilla.org/show_bug.cgi?id=853356#c53, when he said I
tend to think we need a app facing permission request API that allows the
developer to pre-grant permissions.  They could ask for the set of all
things they might be interested in (geo, camera, mic, ect.) in one API
call. Speculatively requesting unrelated permissions in advance of user
actions has some real downsides and I'm much more skeptical of it.

Thanks,
Rob
-- 
Jtehsauts  tshaei dS,o n Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.rt sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform