New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 835037 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature
Proj-VR
Team-Security-UX
Proj-XR

Blocking:
issue 841881



Sign in to add a comment

WebXR: Request camera permission when AR features are requested

Project Member Reported by ddorwin@chromium.org, Apr 19 2018

Issue description

Smartphone AR, such as using ARCore, renders the camera feed underneath the application's augmentation. In the ARCore case, the Android application needs to have the Android Camera permission. For now at least, we will require that applications have the camera permission (the one used by getUserMedia()) in order to access AR functionality. This will be requested automatically when the application requests an AR session.
 
Labels: Proj-XR-AR
This CL (https://chromium-review.googlesource.com/c/chromium/src/+/1014418) addresses this issue although there are some important things to take into account:

1) A new temporary mojom method has been added called InitializeSession that returns true for VR and performs the check chain for ARCore and tries to initialize it if all the checks pass. This is a temporary solution until a bigger refactor lands that corrects the handling of WebXR and AR/VR simultaneously with proper session creation. As a reminder, here are the checks:
1.a) Does the device support ARCore? Always true for now. See 2).
1.b) Did the user provide camera permission?
1.c) Is ARCore installed and is the correct version?
2) In order to strip down ARCore the ARCore APK check code has been removed form the SDK so this CL reimplements it from scratch. There is no check to see if the device supports ARCore. Is not an ideal solution but on devices that do not support ARCore, the check workflow will direct the user to the App store to download ARCore and it won't show as supported for those devices. Then again, not ideal but whitelisting the devices was a no go for ARCore at the moment. Using the full ARCore SDK should be the future path maybe being able to download it at runtime.

Components: -Internals>Permissions Internals>Permissions>Model
Blocking: 841881
Labels: -Pri-2 Pri-1
Project Member

Comment 6 by bugdroid1@chromium.org, May 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bf861661be55cd0cd545fdac3ce3b9b1367a4960

commit bf861661be55cd0cd545fdac3ce3b9b1367a4960
Author: Iker Jamardo <ijamardo@chromium.org>
Date: Fri May 25 22:45:06 2018

Add explicit requestSession call to the browser process for WebXR.

Improves the support for requestSession in WebXR mainly focused on
allowing ARCoreDevice to receive a call when the session request
is made.

Also adds a check to both supportSession and requestSession to ensure
the device supports AR capabilities when the hit-test flag is enabled.

Bug:  835037 

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr
Change-Id: I8090f64a981114b130e446025ec6299fbb5619e4
Reviewed-on: https://chromium-review.googlesource.com/1046107
Commit-Queue: Iker Jamardo <ijamardo@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Klaus Weidner <klausw@chromium.org>
Reviewed-by: Biao She <bshe@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Bill Orr <billorr@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562044}
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/chrome/browser/android/vr/arcore_device/arcore_device.cc
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/chrome/browser/android/vr/arcore_device/arcore_device.h
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/chrome/browser/vr/service/vr_display_host.cc
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/chrome/browser/vr/service/vr_display_host.h
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/device/vr/public/mojom/vr_service.mojom
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/device/vr/vr_device.h
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/device/vr/vr_device_base.cc
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/device/vr/vr_device_base.h
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/device/vr/vr_display_impl.cc
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/device/vr/vr_display_impl.h
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/third_party/WebKit/LayoutTests/xr/resources/xr-device-mocking.js
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/third_party/WebKit/LayoutTests/xr/resources/xr-test-utils.js
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/third_party/blink/renderer/modules/xr/xr_device.cc
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/third_party/blink/renderer/modules/xr/xr_device.h
[modify] https://crrev.com/bf861661be55cd0cd545fdac3ce3b9b1367a4960/third_party/blink/renderer/modules/xr/xr_frame_provider.cc

Labels: -M-68 M-69
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265

commit d6eb0c60433edd4f0bc0b6435a57a9143a6ff265
Author: Iker Jamardo <ijamardo@chromium.org>
Date: Thu Jun 07 18:10:20 2018

Request camera permission when AR features are requested.

Adds a new XRSessionRequest structure to be passed when the
RequestSession call is made to be able to pass information like
user gesture. The RequestSession now requests camera permission
in ARCoreDevice. The code to ask for camera permission has been
copied and adapted from
src/chrome/browser/media/webrtc/media_stream_devices_controller.cc
and a re-check for the Android OS level camera permission is still
needed.

Bug:  835037 ,  845160 , 775372
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr
Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
Reviewed-on: https://chromium-review.googlesource.com/1055677
Commit-Queue: Iker Jamardo <ijamardo@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Bill Orr <billorr@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565347}
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/android/vr/arcore_device/arcore_device.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/android/vr/arcore_device/arcore_device.h
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/android/vr/arcore_device/arcore_gl.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/android/vr/arcore_device/arcore_gl.h
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/android/vr/arcore_device/arcore_gl_thread.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/android/vr/arcore_device/arcore_gl_thread.h
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/android/vr/arcore_device/arcore_impl.h
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/geolocation/geolocation_permission_context_android.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/media/webrtc/media_stream_devices_controller.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/permissions/permission_update_infobar_delegate_android.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/permissions/permission_update_infobar_delegate_android.h
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/vr/service/vr_display_host.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/chrome/browser/vr/service/vr_display_host.h
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/device/vr/public/mojom/vr_service.mojom
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/device/vr/test/mock_vr_display_impl.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/device/vr/test/mock_vr_display_impl.h
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/device/vr/vr_device.h
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/device/vr/vr_device_base.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/device/vr/vr_device_base.h
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/device/vr/vr_device_base_unittest.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/device/vr/vr_display_impl.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/device/vr/vr_display_impl.h
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/device/vr/vr_display_impl_unittest.cc
[modify] https://crrev.com/d6eb0c60433edd4f0bc0b6435a57a9143a6ff265/third_party/blink/renderer/modules/xr/xr_device.cc

Status: Fixed (was: Started)
This is implemented now. We may want to refactor how permissions are requested (issue 845792).
Components: Blink>WebXR

Sign in to add a comment