-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add permission for Accelerometer, Gyroscope, Magnetometer and Orientation Sensor #142
Conversation
@tobie : PTAL. |
I think this needs more discussion. What's the relationship between those permissions? i.e. what happens when the orientation-sensor permission is granted and then further along the gyroscope permission is requested? Etc. |
Currently no relationship, each one is considered separately. Based on the learnings from the recent WebVR Origin Trial, I feel we actually should ship this as an experiment in order to have definitive answer to this kind of ergonomics issues. I leave it to the editors to decide whether to land this spec patch now and possibly adjust later, or leave this open until we have gathered such web developer feedback by shipping an experiment. |
I doubt you'll have anything clear as an answer here unless you ship all motion sensors API together. Not to mention that some of the concerns are related to yet to be released permissions APIs. |
Something concrete as proposed by the Chrome Privacy/Security team after some analysis is as follows: AMBIENT_LIGHT_SENSOR: opt-out UI. granted by default. ACCELEROMETER: auto-grant. no UI. We would go into origin trial with this model, get feedback from developers, and are open to change the policy based on feedback. |
Regarding this PR, iirc it was agreed in TPAC that we use granular permission names. So that implementation can later use whatever privacy policy them deem fit on top of this |
Yes. That was the conclusion then. There's now evidence that this probably won't work well in practice, especially for motion sensors, will cause issues with new APIs (such as revoking permissions), and needs further research/work. |
That's the plan for the Chrome Origin Trial. @marcoscaceres any concerns? We'd like to land this to have it documented before we enter Origin Trial to gather web developers' feedback on the model. Follows 4f95684 |
I meant all motion sensors not just these four. |
@marcoscaceres, that is indeed a very good idea. @tobie, please propose a good wording for the note, perhaps linking to your related research and/or the issue in w3c/sensors so people know where to go to provide further feedback on the topic. |
@riju, please add the following note below the enum PermissionName block:
With this addition we should be good to land this PR, right @tobie and @marcoscaceres? |
LGTM. |
index.bs
Outdated
<p> | ||
The <dfn for="PermissionName" enum-value>"magnetometer"</dfn> | ||
permission is the permission associated with the usage of the | ||
[[ambient-light]] API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be magnetometer?
index.bs
Outdated
<p> | ||
The <dfn for="PermissionName" enum-value>"orientation-sensor"</dfn> | ||
permission is the permission associated with the usage of the | ||
[[ambient-light]] API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
orientation sensor?
f0ed1b5
to
59c35af
Compare
@riju think it's worth dropping "orientation-sensor" from the list due to w3c/orientation-sensor#33 |
index.bs
Outdated
<a enum-value>"clipboard"</a>, | ||
}; | ||
</pre> | ||
<p class="note"> | ||
The enumeration values {{accelerometer}}, {{gyroscope}}, {{magnetometer}}, and | ||
{{orientation-sensor}} are considered provisional and are subject to change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this still mentions orientation-sensor
196f56e
to
4a891ee
Compare
Add note for the new sensor permission types. Note that we considered using a permission type for orientation-sensor, but finally decided against it. Details: w3c/orientation-sensor#33
4a891ee
to
c5eb2b8
Compare
@marcoscaceres, thanks for your patience with this one. We now have LGTMs from @tobie and me, and all the review comments from @raymeskhoury have been addressed. @riju squashed the multiple commits into one so you can maintain your beautiful commit history :-) @marcoscaceres, feel free to land this so we can advance with the implementation. |
Thanks @marcoscaceres! We owe you a 🍻 |
I'll be taking you up on that at TPAC! 💃 |
This is the first part of adding permission guard for sensors based on Generic Sensor Framework. There was consensus to add granular permissions for sensors here w3c/sensors#22 This CL adds permission name for the different sensors in the permission module. Spec discussion : w3c/permissions#142 BUG=606766 Review-Url: https://codereview.chromium.org/2791623004 Cr-Commit-Position: refs/heads/master@{#491303}
Fixes #141.