Plumb Xr Status into InputTransferHandler [chromium/src : main]

0 views
Skip to first unread message

Alexander Cooper (Gerrit)

unread,
Feb 9, 2026, 8:15:06 PM (5 days ago) Feb 9
to Bo Liu, Matthew Jones, Michael Thiessen, Brian Sheedy, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
Attention needed from Aman Verma, Bo Liu, Brian Sheedy, Matthew Jones and Michael Thiessen

Alexander Cooper added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Alexander Cooper . resolved

Bo PTAL InputTransferHandler and transfer_input_to_viz_result.h
Matt PTAL CompositorView
Michael PTAL enums.xml
Brian PTAL WebXrInputTransferTest

Aman Please review all.

Open in Gerrit

Related details

Attention is currently required from:
  • Aman Verma
  • Bo Liu
  • Brian Sheedy
  • Matthew Jones
  • Michael Thiessen
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I28bf79b31cc1fcc3e10c6d1f85d4ef6199a4c9b3
Gerrit-Change-Number: 7552845
Gerrit-PatchSet: 3
Gerrit-Owner: Alexander Cooper <alco...@chromium.org>
Gerrit-Reviewer: Alexander Cooper <alco...@chromium.org>
Gerrit-Reviewer: Aman Verma <ama...@chromium.org>
Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
Gerrit-Reviewer: Brian Sheedy <bsh...@chromium.org>
Gerrit-Reviewer: Matthew Jones <mdj...@chromium.org>
Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
Gerrit-Attention: Bo Liu <bo...@chromium.org>
Gerrit-Attention: Aman Verma <ama...@chromium.org>
Gerrit-Attention: Brian Sheedy <bsh...@chromium.org>
Gerrit-Attention: Matthew Jones <mdj...@chromium.org>
Gerrit-Comment-Date: Tue, 10 Feb 2026 01:14:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Brian Sheedy (Gerrit)

unread,
Feb 9, 2026, 8:46:21 PM (5 days ago) Feb 9
to Alexander Cooper, Bo Liu, Matthew Jones, Michael Thiessen, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
Attention needed from Alexander Cooper, Aman Verma, Bo Liu, Matthew Jones and Michael Thiessen

Brian Sheedy added 6 comments

File chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrInputTransferTest.java
Line 136, Patchset 3 (Latest): CriteriaHelper.pollInstrumentationThread(
() -> {
Criteria.checkThat(
mScrollOffsetY, Matchers.greaterThan(initialScrollOffset));
});
CriteriaHelper.pollInstrumentationThread(
() -> {
Criteria.checkThat(
mLastSeenEventAction, Matchers.equalTo(MotionEvent.ACTION_CANCEL));
});
Brian Sheedy . unresolved

Is it safe to assume that once we get the `ACTION_CANCEL` event action, the scroll offset should have updated? If so, we could probably swap the order and made the scroll check a single assert instead of a poll?

Line 149, Patchset 3 (Latest): CriteriaHelper.pollInstrumentationThread(
() -> {
int numFrames =
Integer.parseInt(
mWebXrArTestFramework.runJavaScriptOrFail(
"window.numFramesWithInput",
WebXrArTestFramework.POLL_TIMEOUT_SHORT_MS));
Criteria.checkThat(numFrames, Matchers.greaterThanOrEqualTo(1));
});
Brian Sheedy . unresolved

Nit: Could be shorter by using `pollJavaScriptBooleanOrFail()` and checking `window.numFramesWithInput >= 1`

Line 158, Patchset 3 (Latest): CriteriaHelper.pollInstrumentationThread(
() -> {
int numSelects =
Integer.parseInt(
mWebXrArTestFramework.runJavaScriptOrFail(
"window.numSelectEvents",
WebXrArTestFramework.POLL_TIMEOUT_SHORT_MS));
Criteria.checkThat(numSelects, Matchers.equalTo(1));
});
Brian Sheedy . unresolved

Ditto.

Line 169, Patchset 3 (Latest): CriteriaHelper.pollInstrumentationThread(
Brian Sheedy . unresolved

I don't think polling does anything here since we're checking that something didn't happen instead of waiting until something happens.

Line 176, Patchset 3 (Latest): CriteriaHelper.pollInstrumentationThread(
Brian Sheedy . unresolved

Ditto.

Line 193, Patchset 3 (Latest): performScrollAndCheckTransfer(true);

// 2. During session: input should NOT be transferred to Viz.
mWebXrArTestFramework.enterSessionWithUserGestureOrFail();
performScrollAndCheckTransfer(false);

// 3. After session: input should be transferred to Viz.
mWebXrArTestFramework.endSession();
performScrollAndCheckTransfer(true);
Brian Sheedy . unresolved

Is there a need to ensure that input has settled between these three steps?

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Cooper
  • Aman Verma
  • Bo Liu
  • Matthew Jones
  • Michael Thiessen
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I28bf79b31cc1fcc3e10c6d1f85d4ef6199a4c9b3
    Gerrit-Change-Number: 7552845
    Gerrit-PatchSet: 3
    Gerrit-Owner: Alexander Cooper <alco...@chromium.org>
    Gerrit-Reviewer: Alexander Cooper <alco...@chromium.org>
    Gerrit-Reviewer: Aman Verma <ama...@chromium.org>
    Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
    Gerrit-Reviewer: Brian Sheedy <bsh...@chromium.org>
    Gerrit-Reviewer: Matthew Jones <mdj...@chromium.org>
    Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Alexander Cooper <alco...@chromium.org>
    Gerrit-Attention: Bo Liu <bo...@chromium.org>
    Gerrit-Attention: Aman Verma <ama...@chromium.org>
    Gerrit-Attention: Matthew Jones <mdj...@chromium.org>
    Gerrit-Comment-Date: Tue, 10 Feb 2026 01:46:12 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aman Verma (Gerrit)

    unread,
    Feb 10, 2026, 8:09:25 AM (5 days ago) Feb 10
    to Alexander Cooper, Bo Liu, Matthew Jones, Michael Thiessen, Brian Sheedy, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
    Attention needed from Alexander Cooper, Aman Verma, Bo Liu, Matthew Jones and Michael Thiessen

    Message from Aman Verma

    Overall, the logic for blocking input transfer to Viz during WebXR/AR sessions looks solid and well-integrated. The new test provides good coverage for the expected behavior.

    I have a few observations and questions:

    • *CompositorView.java**
    • The distinction between AR and VR behavior seems a bit inconsistent.
    • `setOverlayImmersiveArMode` explicitly calls `handler.setIsInXr(enabled)`.
    • `setOverlayVrMode` updates `mIsInXr = enabled` but does NOT update the existing handler.
    • However, `surfaceChanged` calls `handler.setIsInXr(mIsInXr)` for any newly created handler. Since `mIsInXr` is true for both AR and VR, this means if a surface change occurs during a VR session, the input transfer WILL be blocked.
    • The commit message mentions that VR input \"should remain unaffected.\" If this means VR input should still be transferred to Viz, then using the shared `mIsInXr` flag in `surfaceChanged` might inadvertently change VR's behavior. If \"unaffected\" means we don't care if it's blocked, it would be good to clarify.
    • *WebXrInputTransferTest.java**
    • I agree with the nits and suggestions from bsheedy@. Specifically:
    • Using `pollJavaScriptBooleanOrFail()` on L157 and L166 would make the JS checks cleaner.
    • The suggestion to swap the order on L145 and use a single assert if `ACTION_CANCEL` implies a scroll update is a nice cleanup.

    **InputTransferHandler.java**
    The check in `canTransferInputToViz` is straightforward and correctly uses the new `mIsInXr` state.

    **Metrics**
    The addition of `XrIsActive` to `TransferInputToVizResult` and `enums.xml` is correct.

    Gerrit-CC: Aman Verma <ama...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Michael Thiessen <mthi...@chromium.org>
    Gerrit-Attention: Alexander Cooper <alco...@chromium.org>
    Gerrit-Attention: Bo Liu <bo...@chromium.org>
    Gerrit-Attention: Aman Verma <ama...@chromium.org>
    Gerrit-Attention: Matthew Jones <mdj...@chromium.org>
    Gerrit-Comment-Date: Tue, 10 Feb 2026 13:09:12 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aman Verma (Gerrit)

    unread,
    Feb 10, 2026, 8:39:11 AM (5 days ago) Feb 10
    to Alexander Cooper, Bo Liu, Matthew Jones, Michael Thiessen, Brian Sheedy, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
    Attention needed from Alexander Cooper, Aman Verma, Bo Liu, Matthew Jones and Michael Thiessen

    Aman Verma added 6 comments

    Patchset-level comments
    Aman Verma . resolved

    Thanks Alex, conceptually SGTM, added a couple of small things.

    File chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java
    Line 365, Patchset 3 (Latest): assert (handler != null);
    Aman Verma . unresolved

    Nit: parentheses here are redundant, `assert handler != null;`

    Line 386, Patchset 3 (Latest): public void setOverlayVrMode(boolean enabled) {
    Aman Verma . unresolved

    Do we also want to update `InputTransferHandler` in this case?

    File chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrInputTransferTest.java
    Line 135, Patchset 3 (Latest): if (expectTransfer) {
    Aman Verma . unresolved

    Can we check if WebXR did not get any input frames here? Maybe reset the JS counters on line 110 irrespective of `!expectTransfer` and assert numFrames==0 here?

    Line 193, Patchset 3 (Latest): performScrollAndCheckTransfer(true);
    Aman Verma . unresolved

    nit: `/*expectTransfer=*/ true`, same at other places

    File content/public/browser/android/transfer_input_to_viz_result.h
    Line 33, Patchset 3 (Latest): kXrIsActive = 17,
    Aman Verma . unresolved

    Can you please add a TODO here about investigating InputEventObserver potentially, maybe file a bug?

    Gerrit-Comment-Date: Tue, 10 Feb 2026 13:38:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Thiessen (Gerrit)

    unread,
    Feb 10, 2026, 10:45:33 AM (5 days ago) Feb 10
    to Alexander Cooper, Jonathan Ross, Aman Verma, Bo Liu, Matthew Jones, Brian Sheedy, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
    Attention needed from Alexander Cooper, Aman Verma, Bo Liu and Matthew Jones

    Michael Thiessen voted and added 1 comment

    Votes added by Michael Thiessen

    Code-Review+1

    1 comment

    Patchset-level comments
    Michael Thiessen . resolved

    histograms lgtm

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexander Cooper
    • Aman Verma
    • Bo Liu
    • Matthew Jones
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I28bf79b31cc1fcc3e10c6d1f85d4ef6199a4c9b3
      Gerrit-Change-Number: 7552845
      Gerrit-PatchSet: 3
      Gerrit-Owner: Alexander Cooper <alco...@chromium.org>
      Gerrit-Reviewer: Alexander Cooper <alco...@chromium.org>
      Gerrit-Reviewer: Aman Verma <ama...@chromium.org>
      Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
      Gerrit-Reviewer: Brian Sheedy <bsh...@chromium.org>
      Gerrit-Reviewer: Matthew Jones <mdj...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-CC: Aman Verma <ama...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Jonathan Ross <jon...@chromium.org>
      Gerrit-Attention: Alexander Cooper <alco...@chromium.org>
      Gerrit-Attention: Bo Liu <bo...@chromium.org>
      Gerrit-Attention: Aman Verma <ama...@chromium.org>
      Gerrit-Attention: Matthew Jones <mdj...@chromium.org>
      Gerrit-Comment-Date: Tue, 10 Feb 2026 15:45:26 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Bo Liu (Gerrit)

      unread,
      Feb 10, 2026, 12:59:34 PM (5 days ago) Feb 10
      to Alexander Cooper, Michael Thiessen, Jonathan Ross, Aman Verma, Bo Liu, Matthew Jones, Brian Sheedy, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
      Attention needed from Alexander Cooper, Aman Verma and Matthew Jones

      Bo Liu added 3 comments

      Patchset-level comments
      Bo Liu . resolved

      Side question.. was this AI generated review?
      https://chromium-review.googlesource.com/c/chromium/src/+/7552845/3#message-dbd4a064dffb85b867840244f73d9d896c0f37ea

      Weird interface that it's not a comment and no way to reply to it or anything..

      File chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java
      Line 386, Patchset 3 (Latest): public void setOverlayVrMode(boolean enabled) {
      Aman Verma . unresolved

      Do we also want to update `InputTransferHandler` in this case?

      Bo Liu

      +1

      File content/public/android/java/src/org/chromium/content_public/browser/InputTransferHandler.java
      Line 25, Patchset 3 (Latest):public class InputTransferHandler implements WindowAndroid.SelectionHandlesObserver {
      Bo Liu . resolved

      hmm... this is a lot of implementation in the content public API

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alexander Cooper
      • Aman Verma
      • Matthew Jones
      Gerrit-Attention: Aman Verma <ama...@chromium.org>
      Gerrit-Attention: Matthew Jones <mdj...@chromium.org>
      Gerrit-Comment-Date: Tue, 10 Feb 2026 17:59:28 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Aman Verma <ama...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Bo Liu (Gerrit)

      unread,
      Feb 10, 2026, 1:00:22 PM (5 days ago) Feb 10
      to Alexander Cooper, Bo Liu, Michael Thiessen, Jonathan Ross, Aman Verma, Matthew Jones, Brian Sheedy, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
      Attention needed from Alexander Cooper, Aman Verma and Matthew Jones

      Bo Liu voted and added 1 comment

      Votes added by Bo Liu

      Code-Review+1

      1 comment

      Patchset-level comments
      Bo Liu . resolved

      oh and content bits lgtm, I guess

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alexander Cooper
      • Aman Verma
      • Matthew Jones
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      Gerrit-Comment-Date: Tue, 10 Feb 2026 18:00:14 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Matthew Jones (Gerrit)

      unread,
      Feb 10, 2026, 1:09:51 PM (5 days ago) Feb 10
      to Alexander Cooper, Bo Liu, Michael Thiessen, Jonathan Ross, Aman Verma, Brian Sheedy, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
      Attention needed from Alexander Cooper and Aman Verma

      Matthew Jones voted and added 1 comment

      Votes added by Matthew Jones

      Code-Review+1

      1 comment

      Patchset-level comments
      Matthew Jones . resolved

      CompositorView lgtm

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alexander Cooper
      • Aman Verma
      Gerrit-Comment-Date: Tue, 10 Feb 2026 18:09:40 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Aman Verma (Gerrit)

      unread,
      Feb 10, 2026, 1:28:58 PM (5 days ago) Feb 10
      to Alexander Cooper, Matthew Jones, Bo Liu, Michael Thiessen, Jonathan Ross, Brian Sheedy, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
      Attention needed from Alexander Cooper and Aman Verma

      Aman Verma added 1 comment

      Patchset-level comments
      Bo Liu . resolved

      Side question.. was this AI generated review?
      https://chromium-review.googlesource.com/c/chromium/src/+/7552845/3#message-dbd4a064dffb85b867840244f73d9d896c0f37ea

      Weird interface that it's not a comment and no way to reply to it or anything..

      Aman Verma

      Yes, this was gemini-cli generated comment, was trying to see how good it is. Was running it in YOLO mode, lesson learned :P

      Gerrit-Comment-Date: Tue, 10 Feb 2026 18:28:38 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Bo Liu <bo...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alexander Cooper (Gerrit)

      unread,
      Feb 10, 2026, 1:55:52 PM (4 days ago) Feb 10
      to Matthew Jones, Bo Liu, Michael Thiessen, Jonathan Ross, Aman Verma, Brian Sheedy, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
      Attention needed from Aman Verma, Aman Verma, Bo Liu and Brian Sheedy

      Alexander Cooper voted and added 11 comments

      Votes added by Alexander Cooper

      Commit-Queue+1

      11 comments

      File chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java
      Line 365, Patchset 3: assert (handler != null);
      Aman Verma . resolved

      Nit: parentheses here are redundant, `assert handler != null;`

      Alexander Cooper

      Done

      Line 386, Patchset 3: public void setOverlayVrMode(boolean enabled) {
      Aman Verma . unresolved

      Do we also want to update `InputTransferHandler` in this case?

      Bo Liu

      +1

      Alexander Cooper

      I don't think VR needs it because it's input needs are different, but I think given the need to put the logic in `surfaceChanged` it's probably cleaner to do so.

      I've created a helper method to minimize the duplication between the two methods, but I'm not enamored of the name if you have a better suggestion.

      File chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrInputTransferTest.java
      Line 135, Patchset 3: if (expectTransfer) {
      Aman Verma . resolved

      Can we check if WebXR did not get any input frames here? Maybe reset the JS counters on line 110 irrespective of `!expectTransfer` and assert numFrames==0 here?

      Alexander Cooper

      I don't think that's necessary. We do other checks outside of this that should be sufficient to validate if we are in a WebXR session or not.

      Line 136, Patchset 3: CriteriaHelper.pollInstrumentationThread(

      () -> {
      Criteria.checkThat(
      mScrollOffsetY, Matchers.greaterThan(initialScrollOffset));
      });
      CriteriaHelper.pollInstrumentationThread(
      () -> {
      Criteria.checkThat(
      mLastSeenEventAction, Matchers.equalTo(MotionEvent.ACTION_CANCEL));
      });
      Brian Sheedy . resolved

      Is it safe to assume that once we get the `ACTION_CANCEL` event action, the scroll offset should have updated? If so, we could probably swap the order and made the scroll check a single assert instead of a poll?

      Alexander Cooper

      Done

      Line 149, Patchset 3: CriteriaHelper.pollInstrumentationThread(

      () -> {
      int numFrames =
      Integer.parseInt(
      mWebXrArTestFramework.runJavaScriptOrFail(
      "window.numFramesWithInput",
      WebXrArTestFramework.POLL_TIMEOUT_SHORT_MS));
      Criteria.checkThat(numFrames, Matchers.greaterThanOrEqualTo(1));
      });
      Brian Sheedy . resolved

      Nit: Could be shorter by using `pollJavaScriptBooleanOrFail()` and checking `window.numFramesWithInput >= 1`

      Alexander Cooper

      Done

      Line 158, Patchset 3: CriteriaHelper.pollInstrumentationThread(

      () -> {
      int numSelects =
      Integer.parseInt(
      mWebXrArTestFramework.runJavaScriptOrFail(
      "window.numSelectEvents",
      WebXrArTestFramework.POLL_TIMEOUT_SHORT_MS));
      Criteria.checkThat(numSelects, Matchers.equalTo(1));
      });
      Brian Sheedy . resolved

      Ditto.

      Alexander Cooper

      Done

      Line 169, Patchset 3: CriteriaHelper.pollInstrumentationThread(
      Brian Sheedy . resolved

      I don't think polling does anything here since we're checking that something didn't happen instead of waiting until something happens.

      Alexander Cooper

      Done

      Line 176, Patchset 3: CriteriaHelper.pollInstrumentationThread(
      Brian Sheedy . resolved

      Ditto.

      Alexander Cooper

      Done

      Line 193, Patchset 3: performScrollAndCheckTransfer(true);
      Aman Verma . resolved

      nit: `/*expectTransfer=*/ true`, same at other places

      Alexander Cooper

      Done

      Line 193, Patchset 3: performScrollAndCheckTransfer(true);


      // 2. During session: input should NOT be transferred to Viz.
      mWebXrArTestFramework.enterSessionWithUserGestureOrFail();
      performScrollAndCheckTransfer(false);

      // 3. After session: input should be transferred to Viz.
      mWebXrArTestFramework.endSession();
      performScrollAndCheckTransfer(true);
      Brian Sheedy . resolved

      Is there a need to ensure that input has settled between these three steps?

      Alexander Cooper

      I don't think so. I think once the Transfer check is done it's okay to exit, plus we wait on the change in Xr state anyways, which should be sufficient to ensure things have settled down? LMK if you disagree though.

      File content/public/browser/android/transfer_input_to_viz_result.h
      Line 33, Patchset 3: kXrIsActive = 17,
      Aman Verma . resolved

      Can you please add a TODO here about investigating InputEventObserver potentially, maybe file a bug?

      Alexander Cooper

      Done: crbug.com/483269973

      I'll note though that I'm not sure we'll see similar input improvements in Xr mode though to make it worth it, up to you how time intensive it will be to investigate.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Aman Verma
      • Aman Verma
      • Bo Liu
      • Brian Sheedy
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I28bf79b31cc1fcc3e10c6d1f85d4ef6199a4c9b3
      Gerrit-Change-Number: 7552845
      Gerrit-PatchSet: 5
      Gerrit-Owner: Alexander Cooper <alco...@chromium.org>
      Gerrit-Reviewer: Alexander Cooper <alco...@chromium.org>
      Gerrit-Reviewer: Aman Verma <ama...@chromium.org>
      Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
      Gerrit-Reviewer: Brian Sheedy <bsh...@chromium.org>
      Gerrit-Reviewer: Matthew Jones <mdj...@chromium.org>
      Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
      Gerrit-CC: Aman Verma <ama...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Jonathan Ross <jon...@chromium.org>
      Gerrit-Attention: Aman Verma <ama...@google.com>
      Gerrit-Attention: Bo Liu <bo...@chromium.org>
      Gerrit-Attention: Aman Verma <ama...@chromium.org>
      Gerrit-Attention: Brian Sheedy <bsh...@chromium.org>
      Gerrit-Comment-Date: Tue, 10 Feb 2026 18:55:42 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Aman Verma <ama...@google.com>
      Comment-In-Reply-To: Bo Liu <bo...@chromium.org>
      Comment-In-Reply-To: Brian Sheedy <bsh...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Aman Verma (Gerrit)

      unread,
      Feb 10, 2026, 2:01:15 PM (4 days ago) Feb 10
      to Alexander Cooper, Matthew Jones, Bo Liu, Michael Thiessen, Jonathan Ross, Brian Sheedy, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
      Attention needed from Alexander Cooper, Aman Verma, Bo Liu and Brian Sheedy

      Aman Verma voted and added 2 comments

      Votes added by Aman Verma

      Code-Review+1

      2 comments

      Patchset-level comments
      File-level comment, Patchset 5 (Latest):
      Aman Verma . resolved

      LGTM, thanks Alex!

      File chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java
      Line 386, Patchset 3: public void setOverlayVrMode(boolean enabled) {
      Aman Verma . resolved

      Do we also want to update `InputTransferHandler` in this case?

      Bo Liu

      +1

      Alexander Cooper

      I don't think VR needs it because it's input needs are different, but I think given the need to put the logic in `surfaceChanged` it's probably cleaner to do so.

      I've created a helper method to minimize the duplication between the two methods, but I'm not enamored of the name if you have a better suggestion.

      Aman Verma

      Acknowledged

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alexander Cooper
      • Aman Verma
      • Bo Liu
      • Brian Sheedy
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I28bf79b31cc1fcc3e10c6d1f85d4ef6199a4c9b3
          Gerrit-Change-Number: 7552845
          Gerrit-PatchSet: 5
          Gerrit-Owner: Alexander Cooper <alco...@chromium.org>
          Gerrit-Reviewer: Alexander Cooper <alco...@chromium.org>
          Gerrit-Reviewer: Aman Verma <ama...@chromium.org>
          Gerrit-Reviewer: Aman Verma <ama...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Brian Sheedy <bsh...@chromium.org>
          Gerrit-Reviewer: Matthew Jones <mdj...@chromium.org>
          Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Jonathan Ross <jon...@chromium.org>
          Gerrit-Attention: Alexander Cooper <alco...@chromium.org>
          Gerrit-Attention: Bo Liu <bo...@chromium.org>
          Gerrit-Attention: Aman Verma <ama...@chromium.org>
          Gerrit-Attention: Brian Sheedy <bsh...@chromium.org>
          Gerrit-Comment-Date: Tue, 10 Feb 2026 19:00:56 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Aman Verma <ama...@google.com>
          Comment-In-Reply-To: Alexander Cooper <alco...@chromium.org>
          Comment-In-Reply-To: Bo Liu <bo...@chromium.org>
          satisfied_requirement
          open
          diffy

          Brian Sheedy (Gerrit)

          unread,
          Feb 10, 2026, 2:47:01 PM (4 days ago) Feb 10
          to Alexander Cooper, Aman Verma, Matthew Jones, Bo Liu, Michael Thiessen, Jonathan Ross, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org
          Attention needed from Alexander Cooper, Aman Verma and Bo Liu

          Brian Sheedy voted and added 1 comment

          Votes added by Brian Sheedy

          Code-Review+1

          1 comment

          Patchset-level comments
          Brian Sheedy . resolved

          Test code LGTM

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Alexander Cooper
          • Aman Verma
          • Bo Liu
          Gerrit-Comment-Date: Tue, 10 Feb 2026 19:46:49 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Alexander Cooper (Gerrit)

          unread,
          Feb 10, 2026, 4:10:44 PM (4 days ago) Feb 10
          to Brian Sheedy, Aman Verma, Matthew Jones, Bo Liu, Michael Thiessen, Jonathan Ross, Aman Verma, AyeAye, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org

          Alexander Cooper voted and added 1 comment

          Votes added by Alexander Cooper

          Commit-Queue+2

          1 comment

          Patchset-level comments
          Alexander Cooper . resolved

          Thanks folks!

          Open in Gerrit

          Related details

          Attention set is empty
          Gerrit-Comment-Date: Tue, 10 Feb 2026 21:10:34 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Chromium LUCI CQ (Gerrit)

          unread,
          Feb 10, 2026, 4:14:20 PM (4 days ago) Feb 10
          to Alexander Cooper, Brian Sheedy, Aman Verma, Matthew Jones, Bo Liu, Michael Thiessen, Jonathan Ross, Aman Verma, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, feature-v...@chromium.org, asvitkine...@chromium.org

          Chromium LUCI CQ submitted the change

          Change information

          Commit message:
          Plumb Xr Status into InputTransferHandler

          Configures the InputTransferHandler to be aware of WebXR sessions, which
          should not have their input transferred to viz, because doing so blocks
          any processing within the WebXR session.
          Bug: 454058815
          Change-Id: I28bf79b31cc1fcc3e10c6d1f85d4ef6199a4c9b3
          Reviewed-by: Brian Sheedy <bsh...@chromium.org>
          Reviewed-by: Matthew Jones <mdj...@chromium.org>
          Commit-Queue: Alexander Cooper <alco...@chromium.org>
          Reviewed-by: Bo Liu <bo...@chromium.org>
          Reviewed-by: Aman Verma <ama...@google.com>
          Reviewed-by: Michael Thiessen <mthi...@chromium.org>
          Cr-Commit-Position: refs/heads/main@{#1582761}
          Files:
          • M chrome/android/BUILD.gn
          • M chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java
          • A chrome/android/javatests/src/org/chromium/chrome/browser/vr/WebXrInputTransferTest.java
          • A chrome/test/data/xr/e2e_test_files/html/test_webxr_input_transfer.html
          • M content/public/android/java/src/org/chromium/content_public/browser/InputTransferHandler.java
          • M content/public/browser/android/transfer_input_to_viz_result.h
          • M tools/metrics/histograms/metadata/android/enums.xml
          Change size: L
          Delta: 7 files changed, 260 insertions(+), 1 deletion(-)
          Branch: refs/heads/main
          Submit Requirements:
          • requirement satisfiedCode-Review: +1 by Matthew Jones, +1 by Brian Sheedy, +1 by Bo Liu, +1 by Aman Verma, +1 by Michael Thiessen
          Open in Gerrit
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: merged
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I28bf79b31cc1fcc3e10c6d1f85d4ef6199a4c9b3
          Gerrit-Change-Number: 7552845
          Gerrit-PatchSet: 6
          Gerrit-Owner: Alexander Cooper <alco...@chromium.org>
          Gerrit-Reviewer: Alexander Cooper <alco...@chromium.org>
          Gerrit-Reviewer: Aman Verma <ama...@chromium.org>
          Gerrit-Reviewer: Aman Verma <ama...@google.com>
          Gerrit-Reviewer: Bo Liu <bo...@chromium.org>
          Gerrit-Reviewer: Brian Sheedy <bsh...@chromium.org>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: Matthew Jones <mdj...@chromium.org>
          Gerrit-Reviewer: Michael Thiessen <mthi...@chromium.org>
          open
          diffy
          satisfied_requirement
          Reply all
          Reply to author
          Forward
          0 new messages