Request camera permission when AR features are requested. [chromium/src : master]

3 views
Skip to first unread message

Iker Jamardo (Gerrit)

unread,
May 11, 2018, 1:27:08 PM5/11/18
to David Dorwin, Bill Orr, Klaus Weidner, Michael Thiessen, Ian Vollick, Yaron Friedman, Biao She, Max Rebuschatis, blink-...@chromium.org, feature-v...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org

Iker Jamardo would like David Dorwin, Bill Orr, Klaus Weidner, Michael Thiessen, Ian Vollick, Yaron Friedman, Biao She and Max Rebuschatis to review this change.

View Change

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: 837535, 835037

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 improves the supportSession query with a new ar flag.

Bug: 837538
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
---
M chrome/browser/android/vr/arcore_device/arcore_device.cc
M chrome/browser/android/vr/arcore_device/arcore_device.h
M chrome/browser/vr/service/vr_display_host.cc
M chrome/browser/vr/service/vr_display_host.h
M device/vr/public/mojom/vr_service.mojom
M device/vr/vr_device_base.cc
M device/vr/vr_device_base.h
M device/vr/vr_display_impl.cc
M device/vr/vr_display_impl.h
M third_party/blink/renderer/modules/xr/xr_device.cc
M third_party/blink/renderer/modules/xr/xr_device.h
11 files changed, 279 insertions(+), 30 deletions(-)


To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
Gerrit-Change-Number: 1055677
Gerrit-PatchSet: 2
Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
Gerrit-Reviewer: Biao She <bs...@chromium.org>
Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
Gerrit-CC: Aaron Boodman <a...@chromium.org>
Gerrit-CC: Darin Fisher <da...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-MessageType: newchange

Iker Jamardo (Gerrit)

unread,
May 11, 2018, 1:27:09 PM5/11/18
to blink-...@chromium.org, feature-v...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, Bill Orr, Klaus Weidner, David Dorwin, Yaron Friedman, Biao She, Michael Thiessen, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

First push of the camera permission CL using code adapted from the gUM codebase. The OS level recheck needs to happen still, but this CL uses already chromium code to do it.

View Change

    To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
    Gerrit-Change-Number: 1055677
    Gerrit-PatchSet: 2
    Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Biao She <bs...@chromium.org>
    Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
    Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
    Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
    Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
    Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
    Gerrit-CC: Aaron Boodman <a...@chromium.org>
    Gerrit-CC: Darin Fisher <da...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Comment-Date: Fri, 11 May 2018 17:27:06 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Iker Jamardo (Gerrit)

    unread,
    May 11, 2018, 4:29:39 PM5/11/18
    to David Dorwin, Bill Orr, Klaus Weidner, Michael Thiessen, Ian Vollick, Yaron Friedman, Biao She, Max Rebuschatis, blink-...@chromium.org, feature-v...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, Darin Fisher, chromium...@chromium.org, Kentaro Hara, Aaron Boodman

    Iker Jamardo uploaded patch set #3 to this change.

    View Change

    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: 837535, 835037
    ---
    M chrome/browser/android/vr/arcore_device/arcore_device.cc
    M chrome/browser/android/vr/arcore_device/arcore_device.h
    M chrome/browser/vr/service/vr_display_host.cc
    M chrome/browser/vr/service/vr_display_host.h
    M device/vr/public/mojom/vr_service.mojom
    M device/vr/vr_device_base.cc
    M device/vr/vr_device_base.h
    M device/vr/vr_display_impl.cc
    M device/vr/vr_display_impl.h
    M third_party/blink/renderer/modules/xr/xr_device.cc
    M third_party/blink/renderer/modules/xr/xr_device.h
    11 files changed, 279 insertions(+), 30 deletions(-)

    To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
    Gerrit-Change-Number: 1055677
    Gerrit-PatchSet: 3
    Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Biao She <bs...@chromium.org>
    Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
    Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
    Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
    Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
    Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
    Gerrit-CC: Aaron Boodman <a...@chromium.org>
    Gerrit-CC: Darin Fisher <da...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-MessageType: newpatchset

    David Dorwin (Gerrit)

    unread,
    May 13, 2018, 1:56:12 AM5/13/18
    to Iker Jamardo, blink-...@chromium.org, feature-v...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Michael Thiessen, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

    Thanks.

    View Change

    22 comments:

    To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
    Gerrit-Change-Number: 1055677
    Gerrit-PatchSet: 6
    Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Biao She <bs...@chromium.org>
    Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
    Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
    Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
    Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
    Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
    Gerrit-CC: Aaron Boodman <a...@chromium.org>
    Gerrit-CC: Darin Fisher <da...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Comment-Date: Sun, 13 May 2018 05:56:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Iker Jamardo (Gerrit)

    unread,
    May 18, 2018, 4:13:08 PM5/18/18
    to blink-...@chromium.org, feature-v...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, David Dorwin, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Michael Thiessen, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

    View Change

    22 comments:

      • I think it does because it proves that the bug is not solvable as the PermissionManager does not handle this correctly and the re-check is in fact needed. I don't know how a non solvable issue is specified but this CL makes the bug unsolvable (for now). I don't think we should be in a position to make changes in the PermissionManager.

    • File chrome/browser/android/vr/arcore_device/arcore_device.h:

      • Is this part necessary? The call is for camera/video.

      • Is there a reason the callback isn't last?

      • Because the method is a callback for the PermissionManager.RequestPermission call so the callback is just a pass through argument.

      • Patch Set #6, Line 71: mojom::VRDisplayHost::RequestSessionCallback callback,

        nit: […]

        AndroidOSPromptAnswered is used in MediaStreamDevicesController. Anyway, I will use OnAndroidCameraPermissionPromptResult instead.

      • Patch Set #6, Line 72: bool was_android_camera_permission_granted);

        ditto on order question

        ditto on answer.

      • We might want to add a comment that ARCore sessions always require the camera permission. […]

        Don't fully understand what you want, sorry.

      • In the future, we may wan to add a RequestAppropriatePermission to the base class and always call th […]

        Would you like me to file a bug for this and add a TODO in VRDisplayHost?

      • camera? […]

        Done

      • Patch Set #6, Line 183: permission_manager->RequestPermission(

        AFAICT, we have to make this call just so we know the value before requesting permission. […]

        Got rid of it. Let me know if you like this way better.

      • Should we just drop this part?

        I think is an interesting way of solving the problem how it has been resolved in getUserMedia. The other options I can think of are always requesting the permission and always checking if the OS level permission is needed even if the permission request callback states that is allowed. I thought that copying the way getUserMedia does it was the best option as that code seems to have been thoroughly tested and reviewed but happy to change it. Let me know if the way is what you think is best for our use case.

      • Patch Set #6, Line 201: need to be requ

      • nit: "abort the" or "There is no reason to"?

      • Done

      • Why is that? Just because the previous value was ASK doesn't mean we have the Android permission. […]

        Amazingly, the PermissionManager requestPermission call handles both the Chrome level permission and the OS level permission if the prompt happened but the OS level permission is only handled if the Chrome level permission is not granted and is not blocked. That is why the Android level camera permission needs to be re-requested in case. I am happy to change the behavior but this is how the UserMedia code is handling this. Should not be good enough for our use case too? I made some changes to make this easier to understand (I think).

      • Patch Set #6, Line 215: kPt

        nit: is? […]

        Done

      • (because it was already granted)

        Done

      • A

        Done

      • The method we're calling is using "activation".

      • MediaController called it user_gesture. Shouldn't we use the same name?

    To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
    Gerrit-Change-Number: 1055677
    Gerrit-PatchSet: 7
    Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Biao She <bs...@chromium.org>
    Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
    Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
    Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
    Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
    Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
    Gerrit-CC: Aaron Boodman <a...@chromium.org>
    Gerrit-CC: Darin Fisher <da...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Comment-Date: Fri, 18 May 2018 20:13:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: David Dorwin <ddo...@chromium.org>
    Gerrit-MessageType: comment

    David Dorwin (Gerrit)

    unread,
    May 23, 2018, 2:50:09 AM5/23/18
    to Iker Jamardo, blink-...@chromium.org, feature-v...@chromium.org, ipc-securi...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Michael Thiessen, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

    LGTM with comments. Thank you.

    Patch set 8:Code-Review +1

    View Change

    6 comments:

      • I think it does because it proves that the bug is not solvable as the PermissionManager does not han […]

        I think it's fine to reference this CL in the bug, but I wouldn't say this CL is related to the bug. Thus, I think we should drop this one.

    • File chrome/browser/android/vr/arcore_device/arcore_device.cc:

      • Don't fully understand what you want, sorry.

        I was just saying that we might note why we are calling this - because ARCore exposes data from the camera, we require the camera permission.

      • Would you like me to file a bug for this and add a TODO in VRDisplayHost?

        I filed https://crbug.com/845792.

      • Patch Set #6, Line 198: ack).Run(t

        I think is an interesting way of solving the problem how it has been resolved in getUserMedia. […]

        Yes, the fact that it is tested and reviewed is a good point. We could try to find out why it does that. What you have in PS8 seems to be simpler and just potentially call PermissionUpdateInfoBarDelegate::ShouldShowPermissionInfobar() when we don't need to. It's not clear if that is a problem.

        It may also be that gUM needs to know which Android permission to ask for - something we do not. That could have been solved by passing slightly different bools and not exiting early.

    • File chrome/browser/vr/service/vr_display_host.cc:

    To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
    Gerrit-Change-Number: 1055677
    Gerrit-PatchSet: 8
    Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Biao She <bs...@chromium.org>
    Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
    Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
    Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
    Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
    Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
    Gerrit-CC: Aaron Boodman <a...@chromium.org>
    Gerrit-CC: Darin Fisher <da...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Comment-Date: Wed, 23 May 2018 06:50:07 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: David Dorwin <ddo...@chromium.org>
    Comment-In-Reply-To: Iker Jamardo <ijam...@chromium.org>
    Gerrit-MessageType: comment

    Michael Thiessen (Gerrit)

    unread,
    May 23, 2018, 3:28:09 PM5/23/18
    to Iker Jamardo, blink-...@chromium.org, feature-v...@chromium.org, ipc-securi...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, David Dorwin, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

    View Change

    1 comment:

    • File chrome/browser/android/vr/arcore_device/arcore_device.cc:

      • Patch Set #8, Line 196: PermissionUpdateInfoBarDelegate::ShouldShowPermissionInfobar

        I don't think this is quite correct, ShouldShowPermissionInfobar can return false even when you don't have permission, if the WebContents wasn't connected to a window or something.

        I think you should change PermissionUpdateInfoBarDelegate::ShouldShowPermissionInfobar to return an enum, with values something like SHOW_PERMISSION_INFOBAR, PERMISSION_INFOBAR_NOT_NEEDED, and CANNOT_SHOW_PERMISSION_INFOBAR.

        Then we can only return true when we get PERMISSION_INFOBAR_NOT_NECESSARY.

    To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
    Gerrit-Change-Number: 1055677
    Gerrit-PatchSet: 8
    Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Biao She <bs...@chromium.org>
    Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
    Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
    Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
    Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
    Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
    Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
    Gerrit-CC: Aaron Boodman <a...@chromium.org>
    Gerrit-CC: Darin Fisher <da...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Comment-Date: Wed, 23 May 2018 19:28:07 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Michael Thiessen (Gerrit)

    unread,
    May 23, 2018, 7:07:33 PM5/23/18
    to Iker Jamardo, blink-...@chromium.org, feature-v...@chromium.org, ipc-securi...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, David Dorwin, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

    As discussed offline, feel free to land without addressing my comment, but if you do, file a bug to make sure we don't interpret not being able to show a permission infobar as a signal that the permission has been granted.

    Patch set 8:Code-Review +1

    View Change

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 8
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Wed, 23 May 2018 23:07:32 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      Gerrit-MessageType: comment

      Michael Thiessen (Gerrit)

      unread,
      May 23, 2018, 7:09:47 PM5/23/18
      to Iker Jamardo, blink-...@chromium.org, feature-v...@chromium.org, ipc-securi...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, David Dorwin, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      1 comment:

        • Filing a bug sounds good. This line already exists.

          This is purely for testing. It's not possible to mock out a RenderFrameHost, so we just allow a null one for testing.

          No need for a bug, unless the bug is to refactor this somehow to test differently or something.

          I wouldn't bother TBH.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 8
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Wed, 23 May 2018 23:09:44 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No

      David Dorwin (Gerrit)

      unread,
      May 23, 2018, 7:23:59 PM5/23/18
      to Iker Jamardo, blink-...@chromium.org, feature-v...@chromium.org, ipc-securi...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      1 comment:

        • This is purely for testing. […]

          That sounds sketchy - we have code that only exists to handle testing *and* don't document that. We should either pass parameters or inject an object (as you say, that might not be an option here). Passing parameters makes more sense since we don't actually need the object. I think this is something we should clean up and thus should have a bug to at least review.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 8
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Wed, 23 May 2018 23:23:57 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: David Dorwin <ddo...@chromium.org>
      Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>

      Iker Jamardo (Gerrit)

      unread,
      May 24, 2018, 3:45:35 PM5/24/18
      to David Dorwin, Bill Orr, Klaus Weidner, Michael Thiessen, Ian Vollick, Yaron Friedman, Biao She, Max Rebuschatis, blink-...@chromium.org, feature-v...@chromium.org, ipc-securi...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, Darin Fisher, chromium...@chromium.org, Kentaro Hara, Aaron Boodman

      Iker Jamardo uploaded patch set #10 to this change.

      View Change

      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

      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
      ---
      M chrome/browser/android/vr/arcore_device/arcore_device.cc
      M chrome/browser/android/vr/arcore_device/arcore_device.h
      M chrome/browser/vr/service/vr_display_host.cc
      M chrome/browser/vr/service/vr_display_host.h
      M device/vr/public/mojom/vr_service.mojom
      M device/vr/vr_device_base.cc
      M device/vr/vr_device_base.h
      M device/vr/vr_display_impl.cc
      M device/vr/vr_display_impl.h
      M third_party/blink/renderer/modules/xr/xr_device.cc
      10 files changed, 141 insertions(+), 16 deletions(-)

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 10
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-MessageType: newpatchset

      Iker Jamardo (Gerrit)

      unread,
      May 24, 2018, 6:44:17 PM5/24/18
      to David Dorwin, Bill Orr, Klaus Weidner, Michael Thiessen, Ian Vollick, Yaron Friedman, Biao She, Max Rebuschatis, blink-...@chromium.org, feature-v...@chromium.org, ipc-securi...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, Darin Fisher, chromium...@chromium.org, Kentaro Hara, Aaron Boodman

      Iker Jamardo uploaded patch set #11 to this change.

      View Change

      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

      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
      ---
      M chrome/browser/android/vr/arcore_device/arcore_device.cc
      M chrome/browser/android/vr/arcore_device/arcore_device.h
      M chrome/browser/vr/service/vr_display_host.cc
      M chrome/browser/vr/service/vr_display_host.h
      M device/vr/public/mojom/vr_service.mojom
      M device/vr/vr_device_base.cc
      M device/vr/vr_device_base.h
      M device/vr/vr_display_impl.cc
      M device/vr/vr_display_impl.h
      M third_party/blink/renderer/modules/xr/xr_device.cc
      10 files changed, 141 insertions(+), 16 deletions(-)

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 11
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-MessageType: newpatchset

      Iker Jamardo (Gerrit)

      unread,
      May 24, 2018, 7:53:33 PM5/24/18
      to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, David Dorwin, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      7 comments:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 12
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Thu, 24 May 2018 23:53:31 +0000

      Michael Thiessen (Gerrit)

      unread,
      May 25, 2018, 12:51:02 PM5/25/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, David Dorwin, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      1 comment:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 12
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Fri, 25 May 2018 16:51:00 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Gerrit-MessageType: comment

      Iker Jamardo (Gerrit)

      unread,
      May 25, 2018, 6:25:23 PM5/25/18
      to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Raymes Khoury, Michael Thiessen, David Dorwin, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      1 comment:

        • Patch Set #12, Line 243: Create

          This is going to fail a DCHECK if you ignore the result CANNOT_SHOW_PERMISSION_INFOBAR. […]

        • You are right. Thanks Michael!

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 12
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Fri, 25 May 2018 22:25:19 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>
      Gerrit-MessageType: comment

      Iker Jamardo (Gerrit)

      unread,
      May 25, 2018, 8:04:51 PM5/25/18
      to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Raymes Khoury, Michael Thiessen, David Dorwin, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      Fixes Michael's comment on a possible condition that was not taken into account. Improves consistency in a name of InfoBar.

      View Change

      1 comment:

        • You are right. […]

          Done

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 14
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Sat, 26 May 2018 00:04:49 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>

      David Dorwin (Gerrit)

      unread,
      May 26, 2018, 2:00:50 AM5/26/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Raymes Khoury, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      It's not clear why initialization was changed after PS8.

      Patch set 14:-Code-Review

      View Change

      13 comments:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 14
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Sat, 26 May 2018 06:00:48 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Gerrit-MessageType: comment

      David Dorwin (Gerrit)

      unread,
      May 26, 2018, 2:03:38 AM5/26/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Raymes Khoury, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      1 comment:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 14
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Sat, 26 May 2018 06:03:35 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Gerrit-MessageType: comment

      Iker Jamardo (Gerrit)

      unread,
      May 27, 2018, 7:01:28 PM5/27/18
      to David Dorwin, Bill Orr, Klaus Weidner, Michael Thiessen, Raymes Khoury, Ian Vollick, Yaron Friedman, Biao She, Max Rebuschatis, Daniel Cheng, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Darin Fisher, chromium...@chromium.org, Kentaro Hara, Aaron Boodman

      Iker Jamardo uploaded patch set #16 to this change.

      View Change

      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
      ---
      M chrome/browser/android/vr/arcore_device/arcore.h
      M chrome/browser/android/vr/arcore_device/arcore_device.cc
      M chrome/browser/android/vr/arcore_device/arcore_device.h
      M chrome/browser/android/vr/arcore_device/arcore_gl.cc
      M chrome/browser/android/vr/arcore_device/arcore_gl.h
      M chrome/browser/android/vr/arcore_device/arcore_impl.cc
      M chrome/browser/android/vr/arcore_device/arcore_impl.h
      M chrome/browser/android/vr/arcore_device/fake_arcore.cc
      M chrome/browser/android/vr/arcore_device/fake_arcore.h
      M chrome/browser/geolocation/geolocation_permission_context_android.cc
      M chrome/browser/media/webrtc/media_stream_devices_controller.cc
      M chrome/browser/permissions/permission_update_infobar_delegate_android.cc
      M chrome/browser/permissions/permission_update_infobar_delegate_android.h

      M chrome/browser/vr/service/vr_display_host.cc
      M chrome/browser/vr/service/vr_display_host.h
      M device/vr/public/mojom/vr_service.mojom
      M device/vr/vr_device.h

      M device/vr/vr_device_base.cc
      M device/vr/vr_device_base.h
      M device/vr/vr_display_impl.cc
      M device/vr/vr_display_impl.h
      M third_party/blink/renderer/modules/xr/xr_device.cc
      22 files changed, 249 insertions(+), 41 deletions(-)

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 16
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-MessageType: newpatchset

      Raymes Khoury (Gerrit)

      unread,
      May 27, 2018, 9:00:39 PM5/27/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Raymes Khoury, David Dorwin, Daniel Cheng, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      lgtm with nits

      Patch set 16:Code-Review +1

      View Change

      3 comments:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 16
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Mon, 28 May 2018 01:00:34 +0000

      Iker Jamardo (Gerrit)

      unread,
      May 28, 2018, 4:18:20 AM5/28/18
      to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Raymes Khoury, David Dorwin, Daniel Cheng, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      17 comments:

        • Patch Set #14, Line 25: virtual bool IsInitialized() = 0;

          We don't need this if we handle initialization all at once.

        • Is this issue not fixed?

        • Done

        • nit: This part of the name seems unnecessary.

          I added it to differentiate from the OnRequestCameraPermissionResult. Too many method with similar names but not easy solution.

        • Patch Set #14, Line 143: DCHECK(is_arcore_gl_thread_initialized_);

        • nit: success usually comes first.

        • It'd probably be better to switch on this to ensure all cases are handled.

        • This doesn't actually do anything related to requesting a session. […]

          That is not true. We could change the name of the ARCore::Initialize method to InitializeSession or even RequestSession but that is what it is actually doing. The problem is that the initialization of the ARCoreGL thread is not just that but also the transport bridge. As you mention, all this will change with the refactor but I do not think the current approach is incorrect either.

        • Patch Set #14, Line 140: if (arcore_->IsInitialized()) {

          Why are we using arcore_ to track whether this function has been run?

        • Are you referring that you would actually prefer to handle that in the ARCoreDevice side?

        • Done

        • Why did you separate this from the main initialize method? If you need to block on the permission, w […]

          Replied in an earlier review comment.

        • Can we address this now? If so, we should.

        • nit: please update the comment

        • Done

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 17
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Mon, 28 May 2018 08:18:18 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: David Dorwin <ddo...@chromium.org>
      Comment-In-Reply-To: Raymes Khoury <ray...@chromium.org>
      Gerrit-MessageType: comment

      David Dorwin (Gerrit)

      unread,
      May 28, 2018, 2:49:05 PM5/28/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Raymes Khoury, Daniel Cheng, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      The reason for the two-phase initialization still isn't clear. Maybe we should discuss offline.

      View Change

      16 comments:

        • Should not be like https://crbug. […]

          I was just wondering if this is very likely and thus something that needs to be addressed very soon.

        • I added it to differentiate from the OnRequestCameraPermissionResult. […]

          Ack. Hmm, yeah.

        • That is not true. […]

          AFAIU, ARCore and ARCoreGl do not know anything about XRSessions. ARCoreImpl has an ArSession, but I believe that will be shared by all XRSessions and frames (including tabs). Thus, it's not clear that any method in these two classes should include the word "Session" (unless we plan to change the behavior I described).

          I guess you could say that initialization is requesting the ArSession, but that seems more like an implementation detail and more likely to lead to confusion since the two "sessions" are not really related.

        • Are you referring that you would actually prefer to handle that in the ARCoreDevice side?

          I'm saying that we are tracking whether to run this method inside another class. arcore_ is initialized iff we reach line 150 below, so we can track that entirely here without needing to burden the other class and implementations with this.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 17
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Mon, 28 May 2018 18:49:03 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: David Dorwin <ddo...@chromium.org>

      Raymes Khoury (Gerrit)

      unread,
      May 28, 2018, 8:15:44 PM5/28/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Raymes Khoury, David Dorwin, Daniel Cheng, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      1 comment:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 17
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Tue, 29 May 2018 00:15:39 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Gerrit-MessageType: comment

      Daniel Cheng (Gerrit)

      unread,
      May 29, 2018, 5:31:39 AM5/29/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Raymes Khoury, David Dorwin, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      4 comments:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 17
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Tue, 29 May 2018 09:31:37 +0000

      Iker Jamardo (Gerrit)

      unread,
      May 31, 2018, 2:03:28 AM5/31/18
      to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Raymes Khoury, David Dorwin, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      19 comments:

        • AFAIU, ARCore and ARCoreGl do not know anything about XRSessions. […]

          Channged to ARCoreGL::InitializeARCoreSession and ARCore::InitializeSession and the state flag is managed by ARCoreGL.

        • Patch Set #14, Line 140: return true;

          I'm saying that we are tracking whether to run this method inside another class. […]

          Channged to ARCoreGL::InitializeARCoreSession and ARCore::InitializeSession and the state flag is managed by ARCoreGL.

        • Patch Set #14, Line 144: mojom::VRDisplayHost::RequestSessionCallback callback) {

        • Which comment? Line 133? I don't understand how that applies here.

        • Ditto on return, though this one is slightly less obvious

        • Ditto on default and NOTREACHED.

        • nit: This is a bit hard to parse.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 19
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Thu, 31 May 2018 06:03:19 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: David Dorwin <ddo...@chromium.org>
      Comment-In-Reply-To: Iker Jamardo <ijam...@chromium.org>
      Comment-In-Reply-To: Raymes Khoury <ray...@chromium.org>
      Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
      Gerrit-MessageType: comment

      David Dorwin (Gerrit)

      unread,
      May 31, 2018, 3:54:59 AM5/31/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Raymes Khoury, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      7 comments:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 19
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Thu, 31 May 2018 07:54:57 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Iker Jamardo <ijam...@chromium.org>

      Iker Jamardo (Gerrit)

      unread,
      Jun 1, 2018, 2:04:17 AM6/1/18
      to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, David Dorwin, Daniel Cheng, Raymes Khoury, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      13 comments:

        • Patch Set #19, Line 51: Session

          If we don't have this concept in the ARCore interface, we shouldn't have it here either.

        • Channged to ARCoreGL::InitializeARCoreSession and ARCore::InitializeSession and the state flag is ma […]

          ARCoreGL and ARCore's Initialize now initializes everything. The GL thread does not initialize anything at all apart from the thread itself. The first RequestSession handles que ARCore initialization.

        • Channged to ARCoreGL::InitializeARCoreSession and ARCore::InitializeSession and the state flag is ma […]

          Put back to a single Initialize call.

        • I'm not sure this is necessary or that it buys us a whole lot. […]

          Changed it to be all one initialization.

        • Does this mean in the current implementation? If so, you might clarify this by saying "Currently, .. […]

          Yes and no. The main refactor should include the concept of a session in the native side too. Although all the native session might share the same ARCore session underneath, they should include some differences. For example, as we are seeing with pause/resume, they should handle their pause and resume states independently and they need to govern ARCore underneath. But more than that, most likely they may need to handle poses and anchors differently (each session should have its own origin and set of anchors, planes). Of course, internally, they may use the same session, but have the correct algorithms to treat each session independently: use the inverse of the pose matrix at the moment of creation, have their own near far values for projection matrix creation, have their own anchor and plane lists, etc.

          Anyway, in this case, I have modified the comment.

      • File chrome/browser/media/webrtc/media_stream_devices_controller.cc:

        • I would suggest using scoped enums (i.e. enum class) for all new enums.

        • Done

      • File chrome/browser/vr/service/vr_display_host.cc:

        • Patch Set #17, Line 55: device->GetDevice(), std::move(service_client), std::move(display_info),

          I'm a bit curious: why do we allow this to be called when there's no RFH? […]

          Added a comment with a link to a bug. Basically, the RFH can be null because it was needed for enabling a test case. A previous CL that just landed addressed this same concern.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 20
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Fri, 01 Jun 2018 06:04:12 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: David Dorwin <ddo...@chromium.org>

      David Dorwin (Gerrit)

      unread,
      Jun 1, 2018, 3:11:33 PM6/1/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Raymes Khoury, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      I think we've added complexity that moves us further from what we want long term. Let's discuss.

      View Change

      18 comments:

      • File chrome/browser/android/vr/arcore_device/arcore_device.cc:

        • Patch Set #21, Line 139: }

          We've moved the resuming of ARCore from the initialization path to RequestSession. Long term, that is not what we want, and it makes the logic around pausing a bit harder to reason about (as reflected in my comments below).

        • Patch Set #21, Line 146:

          The following code seems to be fixing a bug unrelated to requesting permission. It should be in a separate CL.
          Or is this related to the change in ARCoreGl::Pause()? If so, then I'm concerned about this and we may just need to wait for the refactoring.

        • Patch Set #21, Line 147: // As ARCoreDevice is effectively a single instance for multiple tabs. There

          Either this is an incomplete sentence or "As" should be removed.

        • Patch Set #21, Line 148: the initial focus event is still not wired

          "Initial" - when? On tab switch or ARCoreDevice creation?
          Is that really the problem or would switching tabs also be a problem? Are you only solving for the starting of a session and not the continued use on tab switching?

        • Patch Set #21, Line 151: Force to resume

          This violates the purpose of the focus enforcement. While we require a gesture to request a session, that gesture could have happened at any time. Thus, a backgrounded tab could request a session much after it is backgrounded if it ever had a gesture.

        • Patch Set #21, Line 152: // TODO(): Refactor

          Needs a bug number. Also, if we landed this, it is much more than a refactor - we would need to not be working around focus. That may depend on a refactor.

        • Patch Set #21, Line 153: is_paused_ = false;

          Don't you need to call ResumeTracking instead?
          I guess RunRequestSessionCallback does that. Is the issue that we could again be paused before that runs? This should be explained in a comment.

        • Patch Set #21, Line 155: and

          and what?

        • Patch Set #21, Line 156: // callback should be in fact a call to the RunRequestSessionCallback.

          This doesn't really explain things. Am I supposed to know why RunRequestSessionCallback is relevant? Maybe its name should describe what it does rather than when it is called.

        • Patch Set #21, Line 157: callback = base::BindOnce(&ARCoreDevice::RunRequestSessionCallback,

          Don't change an input parameter like this. Use a different name.

        • Patch Set #21, Line 160: // TODO(https://crbug.com/846521): If the RequestSession call comes before

          Can we do this before all the new code above? We don't need to unpause (already unpaused) or call RunRequestSessionCallback if the thread is not initialized.

          I think that would allow us to at least move the reference to RunRequestSessionCallback to the permission callback as I've commented elsewhere. Ideally, we'd move the unpause there too, though there may be a race condition until we can remove that in the refactor. I think that might be fine/preferable as long as it's clearly documented and tracked.

        • Patch Set #21, Line 189: // TODO(https://crbug.com/838954): Check if ARCore is installed and is the

          Why is this TODO here? Shouldn't that be ARCoreImpl's responsibility?

          I wonder whether this check should before or after the permission check. For Android permissions, we ask for Chrome's permission first, which makes sense. But if the user doesn't have ARCore, giving the site permission doesn't make sense.

        • Patch Set #21, Line 191: PostTaskToGlThread(base::BindOnce(

          I think it would be better if we wrapped this and some other stuff (including the the call back to RunRequestSessionCallback) up in an FinishInitializationIfNecessary method.

          Maybe we can move the is_initialized_ check from ARCoreGl::Initialize() here too since this is the class that's introducing that problem. Ditto for Pause/ResumeTracking, which already check is_arcore_gl_thread_initialized_. They could check a new is_arcore_initialized_ instead.

        • Patch Set #21, Line 313: void ARCoreDevice::RunRequestSessionCallback(

          This should also be moved to the other CL I believe.

      • File chrome/browser/android/vr/arcore_device/arcore_gl.cc:

        • Patch Set #19, Line 148:

          Yes and no. The main refactor should include the concept of a session in the native side too. […]

          Hmm, I wasn't aware of all that. Is it documented anywhere? We should probably record it in a bug to make sure it is not lost.

      • File chrome/browser/android/vr/arcore_device/arcore_gl.cc:

        • Patch Set #21, Line 115: std::move(callback).Run(false);

          The majority of this method could be simplified if it was in a helper (i.e., move 112-155 to private InitializeARCore) that was called from Initialize. Initialize would then run the callback on failure or continue on to initialize the class.

        • Patch Set #21, Line 284: if (is_initialized_) {

          This adds complexity that we won't want long-term and forces some new understanding between this class and its caller that didn't exist before.

      • File chrome/browser/android/vr/arcore_device/arcore_gl_thread.cc:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 21
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Fri, 01 Jun 2018 19:11:30 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: David Dorwin <ddo...@chromium.org>
      Comment-In-Reply-To: Iker Jamardo <ijam...@chromium.org>
      Gerrit-MessageType: comment

      Iker Jamardo (Gerrit)

      unread,
      Jun 2, 2018, 3:05:31 AM6/2/18
      to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, David Dorwin, Daniel Cheng, Raymes Khoury, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      22 comments:

      • File chrome/browser/android/vr/arcore_device/arcore.h:

        • Patch Set #14, Line 25: // If successful, the runtime must be paused when this method returns.

          Put back to a single Initialize method.

          Done

      • File chrome/browser/android/vr/arcore_device/arcore_device.cc:

        • Patch Set #21, Line 139: mojom::VRDisplayHost::RequestSessionCallback callback) {

          We've moved the resuming of ARCore from the initialization path to RequestSession. […]

          I do not fully agree with this. ARCore's initialization is happening in the RequestSession so that is why the resume should happen then. I might be misunderstanding something from your comment.

        • Patch Set #21, Line 146: std::move(callback).Run(false);

          The following code seems to be fixing a bug unrelated to requesting permission. […]

          IMO the only code that is solving the bug is the is_paused_ = false in the RequestSession. Everything else is related to the ARCore initialization change that needs to happen after camera permission request. I agree that is_paused_ = false might not be the best solution but it was just a step while the major refactor comes to resolve the problem of having multiple tabs with multiple sessions.

        • Patch Set #21, Line 147: return;

        • Either this is an incomplete sentence or "As" should be removed.

        • You are right. Sorry. Fixed.

        • "Initial" - when? On tab switch or ARCoreDevice creation? […]

          Is only for new tabs. Once a tab is created and the wiring is done to the ARCoreDevice, the focus events are received correctly, so tab switching is correct. But when a new tab is created and still there is no reference to using WebXR, there is no way to receive the focus event. If there was a previous tab using WebXR, a pause event would have been fired and when the new RequestSession arrives, is_paused_ would be = true. I think I explained this in the comment above.

        • Patch Set #21, Line 151: n(true);

          This violates the purpose of the focus enforcement. […]

          I know this is not "correct" but happy to discuss alternatives. Unless we handle different sessions differently with different pause/resume states, I cannot see other solution (I might be missing it). Also, this kind of aligns with even the initial assumption we made that is_paused_ is false at the beginning so if you don't think is correct here, it won't be correct for the first ReauestSession either (without forcing it here). I hope I explained that correctly in a way that is understandable.

        • Patch Set #21, Line 152: return;

          Needs a bug number. […]

          Yes, just wanted to push a CL for review to see if this approach could even be possible.

        • Don't you need to call ResumeTracking instead? […]

          No, because of 2 things:

          a) ResumeTracking does not force is_paused_ to be false and that is what this is intending to do.
          b) ARCore could not be initialized. yet so the resume would still need to happen afterwards. The whole codepath in this method will take care of it.

          I tried to explain my train of thought earlier in a reply to a review comment.

        • Patch Set #21, Line 155: nce

          and what?

          Sorry, I will try to be more thorough with comments from now on.

        • Patch Set #21, Line 156: // is no concept of a session and the initial focus event is still not wired

          This doesn't really explain things. […]

          Done

        • Patch Set #21, Line 157: // to be received in the PauseTracking/ResumeTracking for a new tab, if one

        • Don't change an input parameter like this. Use a different name.

        • Done

        • Patch Set #21, Line 160: // TODO(): Refactor

          Can we do this before all the new code above? We don't need to unpause (already unpaused) or call Ru […]

          Agreed. Nice catch. Thanks.

        • Patch Set #21, Line 189: CreateMainThreadCallback<bool>(

          Why is this TODO here? Shouldn't that be ARCoreImpl's responsibility? […]

          ARCoreImpl is in the GL thread and the check for ARCore APK should happen in the main thread.

          About the order, I agree that the ARCoreAPK check should be before. I will change it.

        • Patch Set #21, Line 191: // resuming of ARCore if needed, the callback should be in fact a

          I think it would be better if we wrapped this and some other stuff (including the the call back to R […]

          I played around with the idea of is_arcore_initialized flag (nice that we thought the same on this one) but what I did not like is that then all the internal checks in ARCoreGL need to disappear and leave the correct handling in the hands of ARCoreDevice. WDYT?

        • Patch Set #21, Line 313: NOTREACHED() << "Unknown show permission infobar state.";

        • This should also be moved to the other CL I believe.

        • Put back to a single Initialize call.

        • Done

        • This adds complexity that we won't want long-term and forces some new understanding between this cla […]

          The comment is fair enough. Using a is_arcore_initialized_ member attribute in ARCoreDevice would solve that but then it would make this class not to check for incorrect calls when ARCore is not initialized (see all of the CHECK(is_initialized_)-s in all of the methods). Are we prepared for the trade off? I could see 3 possible solutions (maybe more):
          1. This class keeps the flag and add it to ARCoreDevice too.
          2. The IsInitialized is added to the ARCore interface.
          3. We keep it as it is right now.
          I will go for 1 for now.

      • File chrome/browser/android/vr/arcore_device/arcore_gl_thread.cc:

        • Can we remove this parameter now? Or can it fail elsewhere?

        • I agree that removing it makes sense.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 22
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Sat, 02 Jun 2018 07:05:28 +0000

      David Dorwin (Gerrit)

      unread,
      Jun 4, 2018, 4:18:09 PM6/4/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Raymes Khoury, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      I didn't get to ARCoreGl yet.

      View Change

      12 comments:

        • I do not fully agree with this. […]

          I think long-term we want something else to initialize this class on the first RequestSession. This class wouldn't need to know that or support the partially-initialized state.

        • I know this is not "correct" but happy to discuss alternatives. […]

          The initial value of is_paused_ is related to the initialization process. This can happen multiple times and well after initialization.

        • I played around with the idea of is_arcore_initialized flag (nice that we thought the same on this o […]

          Is this reply outdated? It looks like you did add is_arcore_gl_initialized_.

          I think my goal was for proper use of ARCoreGL to not require any checks. The caller would be expected to not call it until initialization is complete rather than for it to try to handle that.

      • File chrome/browser/android/vr/arcore_device/arcore_device.cc:

        • initial focus event is still not wired

        •   // to be received in the PauseTracking/ResumeTracking for a new tab

        • This seems like a tractable problem that is unrelated to refactoring. I'm curious, though, are we not receiving the event or is it not reaching PauseTracking/ResumeTracking or are those exiting early?

          However, I don't think this is sufficient. We need to resume only when a tab with an active ARCore session is in focus. That responsibility probably belongs outside this class.

          Perhaps VRDisplayImpl::RequestSession() should be wrapping the callback with its own that will call ResumeTracking if focused. (To avoid breaking VR in the interim, we could check ShouldPauseTrackingWhenFrameDataRestricted() like we do for focus today.) We might need to change the initial value of is_paused_ in this case (and maybe rename it to swap polarity).

        • Patch Set #22, Line 160: // TODO(): Refactor

          TODO(<BUG>): Resume only when a tab with an active ARCore session is in focus, possibly outside this class.

        • Patch Set #22, Line 164: // correct version.

          Does it make sense to add the following?
          This must happen on the main thread.

        • Patch Set #22, Line 187: PostTaskToGlThread(base::BindOnce(

          I think it would be nice to just call something like FinishInitializationIfNecessary() here. That makes it clear what we're doing and that it has nothing to do with the permission - that we just chained them together. (That name doesn't work too well if we are going to do resume there, but I think we might want to avoid that anyway.)

          Alternatively, that method could have been passed as the callback, wrapping the existing one, and this code would just call it.

          In such a method, I think we should probably check is is_arcore_gl_initialized_. See also my comment below.

        • Patch Set #22, Line 188: ARCoreGl::Initialize

          I think we only want to call this if !is_arcore_gl_initialized_. Otherwise, we should probably call RunRequestSessionCallbackAndResumeARCoreIfNotPaused directly. Also note that these may need to be different callbacks since we don't always need success.

        • Patch Set #22, Line 322: is_arcore_gl_initialized_ = success;

          We really shouldn't be setting this on every session request. Nor should we be initializing ARCoreGL each time.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 22
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Mon, 04 Jun 2018 20:18:07 +0000

      David Dorwin (Gerrit)

      unread,
      Jun 4, 2018, 6:54:44 PM6/4/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Raymes Khoury, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      Finished PS22.

      View Change

      3 comments:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 22
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Mon, 04 Jun 2018 22:54:40 +0000

      Iker Jamardo (Gerrit)

      unread,
      Jun 5, 2018, 3:28:03 AM6/5/18
      to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, David Dorwin, Daniel Cheng, Raymes Khoury, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      Rebasing to master solved the focus event handling on new tabs. Addressed the comments on the last review too.

      View Change

      22 comments:

        • As likely as the bug referenced in my previous comment I guess.

        • IMO the only code that is solving the bug is the is_paused_ = false in the RequestSession. […]

          Fixed by the latest rebase.

        • Patch Set #21, Line 148: ized, the resolution of the request should

          Is only for new tabs. […]

          Resolved in the latest rebase.

        • Patch Set #21, Line 151: n(false);

        • The initial value of is_paused_ is related to the initialization process. […]

        • This has been resolved in the latest rebase.

        • Yes, just wanted to push a CL for review to see if this approach could even be possible.

          Done

        • Patch Set #21, Line 152: return;

        • Yes, just wanted to push a CL for review to see if this approach could even be possible.

        • Is this reply outdated? It looks like you did add is_arcore_gl_initialized_. […]

          Yes, I think this comment was not up to date. How can you do what you mention in your last comment of not having to perform any checks? Make a GL thread call to both instantiate and initialize ARCodeGL?

        • Patch Set #21, Line 313: GetWeakPtr(), std::move(callback)))));

          I do not agree. […]

          Done

      • File chrome/browser/android/vr/arcore_device/arcore_device.cc:

        • This is redundant, right?

          Correct. Made the same mistake as in the past. Thanks for catching it.

        • ditto

          Done

        • Patch Set #22, Line 151: std::move(callback).Run(false);

          These two lines prevent us from requesting the permission for a different origin. […]

          You are right. Thanks for catching it.

        • questSessionPreconditionsComplete,
          GetWeakPtr(), std::move(callback));

          This seems like a tractable problem that is unrelated to refactoring. […]

          Found why on a new tab, the ResumeTracking is not being fired. Resolved it in VRDisplayImpl.

          On a new tab, when XR is referenced, a new VRDisplayImpl is instantiated and the focus state is passed in the constructor. So no "event" firing. But of course, the device does not know about it. In construction, a device has is_focused_frame = false and then the constructor changes it and when that happens, the device should also be notified.

        • Patch Set #22, Line 160: // correct version. This must happen in the main thread.

          TODO(<BUG>): Resume only when a tab with an active ARCore session is in focus, possibly outside this […]

          Resolved the problem (I think) in VRDisplayImpl.

        • Patch Set #22, Line 164: // ARCore sessions require camera permission.

          Does it make sense to add the following? […]

          Done

        • Patch Set #22, Line 187: display::Display::Rotation display_rotation,

          I think it would be nice to just call something like FinishInitializationIfNecessary() here. […]

          Added a function to handle the completion of the preconditions (camera permission and ARCore APK check in the future) and the final initialization of ARCore.

        • Patch Set #22, Line 188: om::VRMagicWindowPro

          I think we only want to call this if !is_arcore_gl_initialized_. […]

          Replied to why I chose this path in the commend below. If multiple RequestSessions are made from the render process before the previous ones are finished, there would be a problem. The current codepath resolves this scenario correctly.

        • Patch Set #22, Line 322: if (!success) {

          We really shouldn't be setting this on every session request. […]

          We are not. ARCoreGL takes care of that. I followed this pattern because my paranoid mind thought that it could happen to receive more than one RequestSession from the render process before the previous ones have resolved the callback. Is that possible? If so, the current codepath resolves the situation gracefully.

      • File chrome/browser/android/vr/arcore_device/arcore_gl.cc:

        • Patch Set #21, Line 284: // hit-test promise resolves immediately prior to the frame for which it is

          I think 1 is fine. […]

          Done

      • File chrome/browser/android/vr/arcore_device/arcore_gl.cc:

        • This should probably still be a DCHECK. […]

        • As I mentioned in different comment on ARCoreDevice, if more than one RequestSession come from the renderer, this whole code path resolves all of the requests gracefully. That is why I did not add the CHECK.

          Added some comments to explain this.

        • Patch Set #22, Line 121: return;

          nit: Do this right before running the callback for consistency and defensively in case someone adds […]

          Done

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 23
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Tue, 05 Jun 2018 07:28:00 +0000

      David Dorwin (Gerrit)

      unread,
      Jun 5, 2018, 2:25:42 PM6/5/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Raymes Khoury, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      Looking good. Some minor stuff and comments about what we might want to do in the future.

      View Change

      11 comments:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 23
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Tue, 05 Jun 2018 18:25:38 +0000

      Daniel Cheng (Gerrit)

      unread,
      Jun 5, 2018, 4:18:06 PM6/5/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, David Dorwin, Raymes Khoury, Michael Thiessen, Bill Orr, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      the ipc side lgtm (and thanks for explaining the RFH issues and filing the bug).

      I have a few more comments, but they are non-blocking: some are just suggestions to simplify the C++, while I also have a design question for WebXR with respect to workers/documents.

      Patch set 23:Code-Review +1

      View Change

      3 comments:

      • File chrome/browser/android/vr/arcore_device/arcore_device.h:

        • Patch Set #23, Line 72: base::OnceCallback<void(void)> callback

          Nit: just write base::OnceClosure here.

          Alternatively, it's probably possible to write a variadic template here so we don't need both variants:

          template <typename... Args>
          static void RunCallbackOnTaskRunner(
          // Note: const ref to avoid refcount churn, since this doesn't take ownership.
          // T* using base::RetainedRef() if needed would also be acceptable.
          const scoped_refptr<base::TaskRunner>& t task_runner,
          base::OnceCallback<void(Args...) callback,
          Args&&... args) {
          task_runner->PostTask(FROM_HERE,
          base::BindOnce(std::move(callback), std::forward<Args>(args)...);
          }
      • File device/vr/vr_display_impl.cc:

        • Is there a reason that we pass this object? […]

          I think the issue is that the device_ might be doing things asynchronously, so at some point, we're going to have to turn the RFH into a routing ID pair and use it as a "weak" pointer.

          That being said, VRDisplayImpl itself should be able to hold RFH directly (it can't outlive the RFH, if I'm reading this code correctly)--though due to the unit test exception, we'd also have to make it handle the null case.

          We should just fix the unit test ;-)

      • File third_party/blink/renderer/modules/xr/xr_device.cc:

        • Btw, I'm a bit surprised: how can we get here with no document? My understanding (from ddorwin) is that WebXR isn't exposed to workers right now.

          (If it is exposed to workers, what is the plan for all the things currently gated on frames?)

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 23
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Tue, 05 Jun 2018 20:18:03 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: David Dorwin <ddo...@chromium.org>
      Gerrit-MessageType: comment

      Bill Orr (Gerrit)

      unread,
      Jun 5, 2018, 6:16:26 PM6/5/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, David Dorwin, Raymes Khoury, Michael Thiessen, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      Patch set 23:Code-Review +1

      View Change

      3 comments:

        • I think the issue is that the device_ might be doing things asynchronously, so at some point, we're […]

          +1 to David's comment. We can pass the id's directly as needed.

          We shouldn't have VRDisplayImpl hold the rfh, because VRDisplayImpl may not always be in the browser process moving forwards.

          Longer term, we should request permissions in browser code before telling the device we want to create a session.

      • File third_party/blink/renderer/modules/xr/xr_device.cc:

        • Btw, I'm a bit surprised: how can we get here with no document? My understanding (from ddorwin) is t […]

          detached navigator?

        • It might be a bit better to make this a local bool then create the Mojo object below where it's need […]

          also, we check above for exclusive. if we are always checking, may as well do it only once.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 23
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Tue, 05 Jun 2018 22:16:21 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: David Dorwin <ddo...@chromium.org>

      Daniel Cheng (Gerrit)

      unread,
      Jun 5, 2018, 7:10:49 PM6/5/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Bill Orr, David Dorwin, Raymes Khoury, Michael Thiessen, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      1 comment:

        • detached navigator?

          Does it even make sense to continue the request in that case? The browser side state will be (or already has been) torn down.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 23
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Tue, 05 Jun 2018 23:10:47 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Bill Orr <bil...@chromium.org>

      Iker Jamardo (Gerrit)

      unread,
      Jun 6, 2018, 12:48:10 PM6/6/18
      to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Bill Orr, David Dorwin, Raymes Khoury, Michael Thiessen, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      13 comments:

        • This is a lot of dependencies and code unrelated to actual ARCore. […]

          What is the right way to address this? Add a comment with a bug reference in here?

        • Patch Set #23, Line 309: OnARCoreGlInitializationComplete(std::move(callback), true);

          Note: I think we could avoid this and just call the callback directly if is_arcore_gl_initialized_. […]

          I think is a good idea to avoid a round trip to the GL thread so I added the check but not calling the callback directly as it could be important to perform the resume of ARCore if it was paused.

        • Not needed.

          Done

        • The check on the flag to see if it is initialized should ensure it, correct?

        • Patch Set #23, Line 43: void RequestPresent(device::mojom::VRSubmitFrameClientPtr client,

          nit: Revert this file as there are no related changes.

        • also, we check above for exclusive. if we are always checking, may as well do it only once.

        • Created a local variable and moved the instantiation of the XRSessionOptions instance to before making the call to the browser process.

          I think the exclusive check merge to avoid having multiple conditionals should be resolved in a different CL.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 24
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Wed, 06 Jun 2018 16:48:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: David Dorwin <ddo...@chromium.org>
      Comment-In-Reply-To: Bill Orr <bil...@chromium.org>
      Comment-In-Reply-To: Iker Jamardo <ijam...@chromium.org>

      David Dorwin (Gerrit)

      unread,
      Jun 6, 2018, 1:13:29 PM6/6/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Daniel Cheng, Bill Orr, Raymes Khoury, Michael Thiessen, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      LGTM with a few comments and resolution of the template suggestion.

      Patch set 24:Code-Review +1

      View Change

      5 comments:

        • Does it even make sense to continue the request in that case? The browser side state will be (or alr […]

          I agree that this is odd and we shouldn't continue.

          This was the same as line 170, which was added by mustaq@ in https://crrev.com/c/737435/4/third_party/WebKit/Source/modules/vr/latest/VRDevice.cpp. I imagine that CL might have been a bit mechanical and thus defensive. We should reach out separately and determine if we can simplify this. For now, you might add a TODO(ijamardo) to determine whether we should just exit.

        • Created a local variable and moved the instantiation of the XRSessionOptions instance to before maki […]

          I think it is reasonable to make this minor improvement in this CL. See the comment with specifics in PS24.

      • File third_party/blink/renderer/modules/xr/xr_device.cc:

        • Patch Set #24, Line 177: bool has_user_activation =

          If we move this new code up to line 160, we can use it at line 170.

          We end up calling this method in non-exclusive VR mode, but that seems okay. (Also, we'd end up exiting if !doc if we decide to change that in the future, but that also seems reasonable.)

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 24
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Wed, 06 Jun 2018 17:13:26 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes

      Iker Jamardo (Gerrit)

      unread,
      Jun 6, 2018, 2:08:38 PM6/6/18
      to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, David Dorwin, Daniel Cheng, Bill Orr, Raymes Khoury, Michael Thiessen, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      3 comments:

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 26
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Wed, 06 Jun 2018 18:08:35 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No

      Michael Thiessen (Gerrit)

      unread,
      Jun 6, 2018, 2:13:18 PM6/6/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Commit Bot, David Dorwin, Daniel Cheng, Bill Orr, Raymes Khoury, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      slgtm

      View Change

      3 comments:

      • File chrome/browser/android/vr/arcore_device/arcore_device.h:

        • Patch Set #24, Line 74: base::BindOnce

          nit: I don't think this BindOnce is necessary.

        • Patch Set #24, Line 63:

            template <typename DataType>
          static void RunCallbackOnTaskRunner(
          const scoped_refptr<base::TaskRunner>& task_runner,
          base::OnceCallback<void(DataType)> callback,
          DataType data) {
          task_runner->PostTask(FROM_HERE,
          base::BindOnce(std::move(callback), std::move(data)));
          }
          static void RunCallbackOnTaskRunnerVoid(
          const scoped_refptr<base::TaskRunner>& task_runner,
          base::OnceClosure callback) {
          task_runner->PostTask(FROM_HERE, base::BindOnce(std::move(callback)));
          }
          template <typename DataType>
          base::OnceCallback<void(DataType)> CreateMainThreadCallback(
          base::OnceCallback<void(DataType)> callback) {
          return base::BindOnce(&ARCoreDevice::RunCallbackOnTaskRunner<DataType>,
          main_thread_task_runner_, std::move(callback));
          }
          base::OnceCallback<void(void)> CreateMainThreadCallbackVoid(
          base::OnceCallback<void(void)> callback) {
          return base::BindOnce(&ARCoreDevice::RunCallbackOnTaskRunnerVoid,
          main_thread_task_runner_, std::move(callback));
          }

          nit: I think it would be better if these helper functions were in the .cc, inside an anonymous namespace. Weird to have a bunch of private functions implemented in the header.

          Feel free to do in a followup.

      • File chrome/browser/android/vr/arcore_device/arcore_device.cc:

        • Patch Set #24, Line 83:

          if (arcore_gl_thread_)
          arcore_gl_thread_->Stop();

          Unrelated to your CL, but this isn't necessary. The thread destructor will automatically call stop for you.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 26
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Commit Bot <commi...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Wed, 06 Jun 2018 18:13:10 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Gerrit-MessageType: comment

      Iker Jamardo (Gerrit)

      unread,
      Jun 6, 2018, 3:47:41 PM6/6/18
      to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Michael Thiessen, Commit Bot, David Dorwin, Daniel Cheng, Bill Orr, Raymes Khoury, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      2 comments:

        • nit: I don't think this BindOnce is necessary.

          Done

        •   template <typename DataType>
          static void RunCallbackOnTaskRunner(
          const scoped_refptr<base::TaskRunner>& task_runner,
          base::OnceCallback<void(DataType)> callback,
          DataType data) {
          task_runner->PostTask(FROM_HERE,
          base::BindOnce(std::move(callback), std::move(data)));
          }
          static void RunCallbackOnTaskRunnerVoid(
          const scoped_refptr<base::TaskRunner>& task_runner,

        •       base::OnceClosure callback);


        • template <typename DataType>
          base::OnceCallback<void(DataType)> CreateMainThreadCallback(
          base::OnceCallback<void(DataType)> callback) {
          return base::BindOnce(&ARCoreDevice::RunCallbackOnTaskRunner<DataType>,
          main_thread_task_runner_, std::move(callback));
          }
          base::OnceCallback<void(void)> CreateMainThreadCallbackVoid(

        •       base::OnceCallback<void(void)> callback);

          void PostTaskToGlThread(base::OnceClosure task);

          bool IsOnMainThread();

          nit: I think it would be better if these helper functions were in the . […]

          Done

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 27
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Commit Bot <commi...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Wed, 06 Jun 2018 19:47:36 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>
      Gerrit-MessageType: comment

      Michael Thiessen (Gerrit)

      unread,
      Jun 6, 2018, 3:58:45 PM6/6/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Commit Bot, David Dorwin, Daniel Cheng, Bill Orr, Raymes Khoury, Klaus Weidner, Yaron Friedman, Biao She, Ian Vollick, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      View Change

      1 comment:

        •   template <typename DataType>
          static void RunCallbackOnTaskRunner(
          const scoped_refptr<base::TaskRunner>& task_runner,
          base::OnceCallback<void(DataType)> callback,
          DataType data) {
          task_runner->PostTask(FROM_HERE,
          base::BindOnce(std::move(callback), std::move(data)));
          }
          static void RunCallbackOnTaskRunnerVoid(
          const scoped_refptr<base::TaskRunner>& task_runner,
          base::OnceClosure callback);
          template <typename DataType>
          base::OnceCallback<void(DataType)> CreateMainThreadCallback(
          base::OnceCallback<void(DataType)> callback) {
          return base::BindOnce(&ARCoreDevice::RunCallbackOnTaskRunner<DataType>,
          main_thread_task_runner_, std::move(callback));
          }
          base::OnceCallback<void(void)> CreateMainThreadCallbackVoid(
          base::OnceCallback<void(void)> callback);

          void PostTaskToGlThread(base::OnceClosure task);

          bool IsOnMainThread();

        • Done

          Well that's not exactly what I was suggesting. I meant putting them next to CreateVRDisplayInfo in the .cc file, with the header not knowing of their existence.

      To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
      Gerrit-Change-Number: 1055677
      Gerrit-PatchSet: 27
      Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Biao She <bs...@chromium.org>
      Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
      Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
      Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
      Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Commit Bot <commi...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Comment-Date: Wed, 06 Jun 2018 19:58:43 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Michael Thiessen <mthi...@chromium.org>

      Ian Vollick (Gerrit)

      unread,
      Jun 7, 2018, 1:19:33 AM6/7/18
      to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Michael Thiessen, Commit Bot, David Dorwin, Daniel Cheng, Bill Orr, Raymes Khoury, Klaus Weidner, Yaron Friedman, Biao She, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

      Patch set 30:Commit-Queue +2

      View Change

        To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
        Gerrit-Change-Number: 1055677
        Gerrit-PatchSet: 30
        Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
        Gerrit-Reviewer: Biao She <bs...@chromium.org>
        Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
        Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
        Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
        Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
        Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
        Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-Comment-Date: Thu, 07 Jun 2018 05:19:30 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        Gerrit-MessageType: comment

        Commit Bot (Gerrit)

        unread,
        Jun 7, 2018, 1:19:39 AM6/7/18
        to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Ian Vollick, Michael Thiessen, David Dorwin, Daniel Cheng, Bill Orr, Raymes Khoury, Klaus Weidner, Yaron Friedman, Biao She, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

        CQ is trying the patch.

        Note: The patchset sent to CQ was uploaded after this CL was approved.
        "Rebase" https://chromium-review.googlesource.com/c/1055677/30

        Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/chromium-review.googlesource.com/1055677/30

        Bot data: {"action": "start", "triggered_at": "2018-06-07T05:19:30.0Z", "cq_cfg_revision": "c5e58f70d145a56376881fa216a229aaeb1aa6be", "revision": "c647a7cba554272999065e72e32e3e6e64a7ab93"}

        Gerrit-Comment-Date: Thu, 07 Jun 2018 05:19:38 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: No
        Gerrit-MessageType: comment

        Ian Vollick (Gerrit)

        unread,
        Jun 7, 2018, 1:27:11 AM6/7/18
        to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Michael Thiessen, Commit Bot, David Dorwin, Daniel Cheng, Bill Orr, Raymes Khoury, Klaus Weidner, Yaron Friedman, Biao She, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

        Patch set 30:Commit-Queue +1

        View Change

          To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: master
          Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
          Gerrit-Change-Number: 1055677
          Gerrit-PatchSet: 30
          Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
          Gerrit-Reviewer: Biao She <bs...@chromium.org>
          Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
          Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
          Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
          Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
          Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
          Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
          Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
          Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
          Gerrit-CC: Aaron Boodman <a...@chromium.org>
          Gerrit-CC: Commit Bot <commi...@chromium.org>
          Gerrit-CC: Darin Fisher <da...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-Comment-Date: Thu, 07 Jun 2018 05:27:09 +0000

          Iker Jamardo (Gerrit)

          unread,
          Jun 7, 2018, 10:27:00 AM6/7/18
          to blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Ian Vollick, Michael Thiessen, Commit Bot, David Dorwin, Daniel Cheng, Bill Orr, Raymes Khoury, Klaus Weidner, Yaron Friedman, Biao She, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

          Patch set 31:Commit-Queue +2

          View Change

            To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
            Gerrit-Change-Number: 1055677
            Gerrit-PatchSet: 31
            Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
            Gerrit-Reviewer: Biao She <bs...@chromium.org>
            Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
            Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
            Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
            Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
            Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
            Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
            Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
            Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
            Gerrit-CC: Aaron Boodman <a...@chromium.org>
            Gerrit-CC: Commit Bot <commi...@chromium.org>
            Gerrit-CC: Darin Fisher <da...@chromium.org>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-Comment-Date: Thu, 07 Jun 2018 14:26:58 +0000

            Commit Bot (Gerrit)

            unread,
            Jun 7, 2018, 10:27:14 AM6/7/18
            to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Ian Vollick, Michael Thiessen, David Dorwin, Daniel Cheng, Bill Orr, Raymes Khoury, Klaus Weidner, Yaron Friedman, Biao She, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

            CQ is trying the patch.

            Note: The patchset sent to CQ was uploaded after this CL was approved.

            "Replies to nit review comments." https://chromium-review.googlesource.com/c/1055677/31

            Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/chromium-review.googlesource.com/1055677/31

            Bot data: {"action": "start", "triggered_at": "2018-06-07T14:26:58.0Z", "cq_cfg_revision": "c5e58f70d145a56376881fa216a229aaeb1aa6be", "revision": "fa3317d5a1ed9a383fa4e27d03e2b9ee4d6650ae"}

            Gerrit-Comment-Date: Thu, 07 Jun 2018 14:27:07 +0000

            Commit Bot (Gerrit)

            unread,
            Jun 7, 2018, 2:10:27 PM6/7/18
            to Iker Jamardo, blink-...@chromium.org, chfreme...@chromium.org, dominic...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, hanxi...@chromium.org, ipc-securi...@chromium.org, mattreyno...@chromium.org, mlamouri+watc...@chromium.org, mlamouri+watc...@chromium.org, qsr+...@chromium.org, raymes...@chromium.org, timloh...@chromium.org, viettrung...@chromium.org, Ian Vollick, Michael Thiessen, David Dorwin, Daniel Cheng, Bill Orr, Raymes Khoury, Klaus Weidner, Yaron Friedman, Biao She, Max Rebuschatis, Aaron Boodman, chromium...@chromium.org, Darin Fisher, Kentaro Hara

            Commit Bot merged this change.

            View Change

            Approvals: David Dorwin: Looks good to me Raymes Khoury: Looks good to me Daniel Cheng: Looks good to me Michael Thiessen: Looks good to me Bill Orr: Looks good to me Iker Jamardo: Commit
            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 <ijam...@chromium.org>
            Reviewed-by: David Dorwin <ddo...@chromium.org>
            Reviewed-by: Daniel Cheng <dch...@chromium.org>
            Reviewed-by: Bill Orr <bil...@chromium.org>
            Reviewed-by: Raymes Khoury <ray...@chromium.org>
            Reviewed-by: Michael Thiessen <mthi...@chromium.org>
            Cr-Commit-Position: refs/heads/master@{#565347}
            ---
            M chrome/browser/android/vr/arcore_device/arcore_device.cc
            M chrome/browser/android/vr/arcore_device/arcore_device.h
            M chrome/browser/android/vr/arcore_device/arcore_gl.cc
            M chrome/browser/android/vr/arcore_device/arcore_gl.h
            M chrome/browser/android/vr/arcore_device/arcore_gl_thread.cc
            M chrome/browser/android/vr/arcore_device/arcore_gl_thread.h
            M chrome/browser/android/vr/arcore_device/arcore_impl.h
            M chrome/browser/geolocation/geolocation_permission_context_android.cc
            M chrome/browser/media/webrtc/media_stream_devices_controller.cc
            M chrome/browser/permissions/permission_update_infobar_delegate_android.cc
            M chrome/browser/permissions/permission_update_infobar_delegate_android.h
            M chrome/browser/vr/service/vr_display_host.cc
            M chrome/browser/vr/service/vr_display_host.h
            M device/vr/public/mojom/vr_service.mojom
            M device/vr/test/mock_vr_display_impl.cc
            M device/vr/test/mock_vr_display_impl.h
            M device/vr/vr_device.h
            M device/vr/vr_device_base.cc
            M device/vr/vr_device_base.h
            M device/vr/vr_device_base_unittest.cc
            M device/vr/vr_display_impl.cc
            M device/vr/vr_display_impl.h
            M device/vr/vr_display_impl_unittest.cc
            M third_party/blink/renderer/modules/xr/xr_device.cc
            24 files changed, 371 insertions(+), 87 deletions(-)


            To view, visit change 1055677. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-Change-Id: Iecabc3927beb6106a1ada5289f3af3ecffd48ed8
            Gerrit-Change-Number: 1055677
            Gerrit-PatchSet: 32
            Gerrit-Owner: Iker Jamardo <ijam...@chromium.org>
            Gerrit-Reviewer: Biao She <bs...@chromium.org>
            Gerrit-Reviewer: Bill Orr <bil...@chromium.org>
            Gerrit-Reviewer: Commit Bot <commi...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: David Dorwin <ddo...@chromium.org>
            Gerrit-Reviewer: Ian Vollick <vol...@chromium.org>
            Gerrit-Reviewer: Iker Jamardo <ijam...@chromium.org>
            Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
            Gerrit-Reviewer: Max Rebuschatis <linco...@chromium.org>
            Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
            Gerrit-Reviewer: Raymes Khoury <ray...@chromium.org>
            Gerrit-Reviewer: Yaron Friedman <yfri...@chromium.org>
            Gerrit-CC: Aaron Boodman <a...@chromium.org>
            Gerrit-CC: Darin Fisher <da...@chromium.org>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-MessageType: merged
            Reply all
            Reply to author
            Forward
            0 new messages