Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions prompt support in Servo #23376

Closed
Manishearth opened this issue May 13, 2019 · 10 comments
Closed

Permissions prompt support in Servo #23376

Manishearth opened this issue May 13, 2019 · 10 comments

Comments

@Manishearth
Copy link
Member

@Manishearth Manishearth commented May 13, 2019

Currently Servo cannot trigger permissions prompts. This is going to be necessary to be able to expose getUserMedia() and some of the XR stuff.

This will likely be somewhere in the embedder API.

Ideally, for getUserMedia() we can have a "pick your device" menu as well (may need a separate API)

cc @paulrouget

@jdm
Copy link
Member

@jdm jdm commented May 13, 2019

There is some overlap with the work for #23057, too.

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented May 14, 2019

Where is the code that scan for media devices? In Servo or in the embedder?

@Manishearth
Copy link
Member Author

@Manishearth Manishearth commented May 14, 2019

It's currently in Gstreamer. This can be changed to make it an embedder hook.

The primary goal of this issue is to have some ability to throw up a permissions prompt, we can extend that for getUserMedia()'s media selection later. I bring it up now so that whatever we design can be extended with selection dropdowns/etc.

@gatoWololo
Copy link
Contributor

@gatoWololo gatoWololo commented Jun 7, 2019

Hello,

I started looking at this issue. I followed jdm's link to #23057, I see how #20428 and #20429 moved use of tinyfiledialogs to the embedder.

I saw components/script/dom/permissions.rs has the functions permission_request(...) and prompt_user(...). Is this not the

Currently Servo cannot trigger permissions prompts

that this issue refers to? If so, what's the difference and where should it go? Thanks.

@jdm
Copy link
Member

@jdm jdm commented Jun 7, 2019

Manish's statement wasn't completely correct. Servo does partially support the DOM Permissions API, but only displays prompts for bluetooth-related permissions checks and only on Linux. We will need to add DOM Permissions API integration into Servo's GetUserMedia implementation, but first we should create the right infrastructure for that by fixing #23057, which is really the issue that I intended to send you.

@gatoWololo
Copy link
Contributor

@gatoWololo gatoWololo commented Jun 7, 2019

Cool, I'll look at #23057 then.

@Manishearth
Copy link
Member Author

@Manishearth Manishearth commented Dec 3, 2019

We're going to need hooks for permissions prompts in embedder stuff for Hololens, at least cc @paulrouget

Immersive mode is supposed to trigger permissions prompts in many cases.

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Dec 4, 2019

I like the prompt service we have in Gecko: https://dxr.mozilla.org/mozilla-central/source/toolkit/components/windowwatcher/nsIPromptService.idl

Would that work for your use cases (getUserMedia and immersive mode)?

@Manishearth
Copy link
Member Author

@Manishearth Manishearth commented Dec 4, 2019

Probably yeah. We'd need some kind of embedder API and a native implementation for the hololens.

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Dec 9, 2019

WIP https://github.com/paulrouget/servo/tree/prompt
Still need to figure out how to properly block on the dialogs for the UWP port.

@jdm jdm added this to To do in HoloLens Dec 9, 2019
bors-servo added a commit that referenced this issue Feb 7, 2020
Mechanism to allow Servo to prompt the user

This blocks the embedder thread (compositor thread). Not ideal. I don't think it's too much work to only block script, I'll do that in a follow up bug.

Fix #23376

@Manishearth we have a few new APIs. Hopefully this will cover your needs. A thing I haven't implemented yet is a way to ask the user to pick from a list. Let me know if it's something you'll need.
bors-servo added a commit that referenced this issue Feb 7, 2020
Mechanism to allow Servo to prompt the user

This blocks the embedder thread (compositor thread). Not ideal. I don't think it's too much work to only block script, I'll do that in a follow up bug.

Fix #23376

@Manishearth we have a few new APIs. Hopefully this will cover your needs. A thing I haven't implemented yet is a way to ask the user to pick from a list. Let me know if it's something you'll need.
bors-servo added a commit that referenced this issue Feb 7, 2020
Mechanism to allow Servo to prompt the user

This blocks the embedder thread (compositor thread). Not ideal. I don't think it's too much work to only block script, I'll do that in a follow up bug.

Fix #23376

@Manishearth we have a few new APIs. Hopefully this will cover your needs. A thing I haven't implemented yet is a way to ask the user to pick from a list. Let me know if it's something you'll need.
bors-servo added a commit that referenced this issue Feb 7, 2020
Mechanism to allow Servo to prompt the user

This blocks the embedder thread (compositor thread). Not ideal. I don't think it's too much work to only block script, I'll do that in a follow up bug.

Fix #23376

@Manishearth we have a few new APIs. Hopefully this will cover your needs. A thing I haven't implemented yet is a way to ask the user to pick from a list. Let me know if it's something you'll need.
bors-servo added a commit that referenced this issue Feb 7, 2020
Mechanism to allow Servo to prompt the user

This blocks the embedder thread (compositor thread). Not ideal. I don't think it's too much work to only block script, I'll do that in a follow up bug.

Fix #23376

@Manishearth we have a few new APIs. Hopefully this will cover your needs. A thing I haven't implemented yet is a way to ask the user to pick from a list. Let me know if it's something you'll need.
bors-servo added a commit that referenced this issue Feb 10, 2020
Mechanism to allow Servo to prompt the user

This blocks the embedder thread (compositor thread). Not ideal. I don't think it's too much work to only block script, I'll do that in a follow up bug.

Fix #23376

@Manishearth we have a few new APIs. Hopefully this will cover your needs. A thing I haven't implemented yet is a way to ask the user to pick from a list. Let me know if it's something you'll need.
bors-servo added a commit that referenced this issue Feb 10, 2020
Mechanism to allow Servo to prompt the user

This blocks the embedder thread (compositor thread). Not ideal. I don't think it's too much work to only block script, I'll do that in a follow up bug.

Fix #23376

@Manishearth we have a few new APIs. Hopefully this will cover your needs. A thing I haven't implemented yet is a way to ask the user to pick from a list. Let me know if it's something you'll need.
bors-servo added a commit that referenced this issue Feb 10, 2020
Mechanism to allow Servo to prompt the user

This blocks the embedder thread (compositor thread). Not ideal. I don't think it's too much work to only block script, I'll do that in a follow up bug.

Fix #23376

@Manishearth we have a few new APIs. Hopefully this will cover your needs. A thing I haven't implemented yet is a way to ask the user to pick from a list. Let me know if it's something you'll need.
@atouchet atouchet moved this from To do to Done in HoloLens Feb 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
HoloLens
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants
You can’t perform that action at this time.