CL 8890695: [Web Haptics] Report rejected requests in DevTools [chromium/src : main]

0 views
Skip to first unread message

Alexander Kyereboah (Gerrit)

unread,
Dec 2, 2026, 1:15:05 PM (4 days ago) Dec 2
to Robert Paveza, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
Attention needed from Robert Paveza

Alexander Kyereboah voted and added 1 comment on change 8890695

Votes added by Alexander Kyereboah <akyer...@microsoft.com>

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Alexander Kyereboah . resolved

Adding Rob as a local DevTools reviewer, PTAL!

Open in Gerrit

Related details

Attention is currently required from:
  • Robert Paveza
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: Ia5ba3b36d8f8eb4550adf7d11b75eb7031b5332c
Gerrit-Change-Number: 8890695
Gerrit-PatchSet: 4
Gerrit-Owner: Alexander Kyereboah <akyer...@microsoft.com>
Gerrit-Reviewer: Alexander Kyereboah <akyer...@microsoft.com>
Gerrit-Reviewer: Robert Paveza <Rob.P...@microsoft.com>
Gerrit-Attention: Robert Paveza <Rob.P...@microsoft.com>
Gerrit-Comment-Date: Wed, 02 Dec 2026 18:14:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Robert Paveza (Gerrit)

unread,
Dec 2, 2026, 6:30:33 PM (4 days ago) Dec 2
to Alexander Kyereboah, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
Attention needed from Alexander Kyereboah

Robert Paveza added 4 comments on change 8890695

Patchset-level comments
Robert Paveza . resolved

We talked about these offline. I'm generally happy with your answers, but I'll post them so you can leave them. Overall lgtm, but I'm no longer a DevTools reviewer!

File content/browser/devtools/devtools_instrumentation.cc
Line 456, Patchset 4 (Latest):std::unique_ptr<protocol::Audits::InspectorIssue> BuildHapticsIssue(
Robert Paveza . unresolved

Your CL description says "Include the JS call site" but I don't see that occurring here?

Line 465, Patchset 4 (Latest): protocol::Audits::HapticsIssueReasonEnum::PermissionsPolicyBlocked;
Robert Paveza . unresolved

Nit: is an `-Enum` suffix common on these type names? I don't recall that being a thing.

File content/browser/haptics/haptics_manager.h
Line 23, Patchset 4 (Latest): PlayCallback callback) = 0;
Robert Paveza . unresolved

I'm trying to grok what the purpose is of the continuation-passing model is here. I was under the impression that the haptics issues were sourced in the event that there was a problem with the parameters passed to the API. If that's the case, you should be able to dispatch the issue without having a continuation by returning a return-value instead (i.e. `virtual HapticsResult PlayHaptics` rather than a continuation).

If that isn't possible I guess a continuation is the only way forward. Just wanted some clarity.

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Kyereboah
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: Ia5ba3b36d8f8eb4550adf7d11b75eb7031b5332c
    Gerrit-Change-Number: 8890695
    Gerrit-PatchSet: 4
    Gerrit-Owner: Alexander Kyereboah <akyer...@microsoft.com>
    Gerrit-Reviewer: Alexander Kyereboah <akyer...@microsoft.com>
    Gerrit-Reviewer: Robert Paveza <Rob.P...@microsoft.com>
    Gerrit-Attention: Alexander Kyereboah <akyer...@microsoft.com>
    Gerrit-Comment-Date: Wed, 02 Dec 2026 23:30:25 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alexander Kyereboah (Gerrit)

    unread,
    Dec 2, 2026, 7:35:10 PM (4 days ago) Dec 2
    to Robert Paveza, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org

    Alexander Kyereboah added 3 comments on change 8890695

    File content/browser/devtools/devtools_instrumentation.cc
    Line 456, Patchset 4 (Latest):std::unique_ptr<protocol::Audits::InspectorIssue> BuildHapticsIssue(
    Robert Paveza . unresolved

    Your CL description says "Include the JS call site" but I don't see that occurring here?

    Alexander Kyereboah

    When we're reporting renderer-side checks, we can easily grab the call site directly, but we'd have to capture and report the call site across the mojom boundary for browser-side checks. I think it also makes less sense for platform level failures to report a javascript call site, but I'm not opposed to either removing the call site reporting all-up or implementing the additional overhead for sending call site info down the pipe.

    Will leave this as an open question for DevTools reviewers if it is a design concern.

    Line 465, Patchset 4 (Latest): protocol::Audits::HapticsIssueReasonEnum::PermissionsPolicyBlocked;
    Robert Paveza . resolved

    Nit: is an `-Enum` suffix common on these type names? I don't recall that being a thing.

    Alexander Kyereboah

    It's automatically generated when describing the Enum in mojom!

    File content/browser/haptics/haptics_manager.h
    Line 23, Patchset 4 (Latest): PlayCallback callback) = 0;
    Robert Paveza . resolved

    I'm trying to grok what the purpose is of the continuation-passing model is here. I was under the impression that the haptics issues were sourced in the event that there was a problem with the parameters passed to the API. If that's the case, you should be able to dispatch the issue without having a continuation by returning a return-value instead (i.e. `virtual HapticsResult PlayHaptics` rather than a continuation).

    If that isn't possible I guess a continuation is the only way forward. Just wanted some clarity.

    Alexander Kyereboah

    Good question, since the Haptics API was a one-way call across mojom, we have no way of reporting errors that happened in the browser side back across the mojom pipe (that Android uses). We've added a new method with a callback for playHaptics which allows us to communicate platform errors that happen across the pipe. If we were only reporting renderer errors (parameters like you said, or permission policy, etc.) then we wouldn't need the callback anymore.

    Open in Gerrit

    Related details

    Attention set is empty
    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: Ia5ba3b36d8f8eb4550adf7d11b75eb7031b5332c
    Gerrit-Change-Number: 8890695
    Gerrit-PatchSet: 4
    Gerrit-Owner: Alexander Kyereboah <akyer...@microsoft.com>
    Gerrit-Reviewer: Alexander Kyereboah <akyer...@microsoft.com>
    Gerrit-Reviewer: Robert Paveza <Rob.P...@microsoft.com>
    Gerrit-Comment-Date: Thu, 03 Dec 2026 00:34:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Robert Paveza <Rob.P...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alexander Kyereboah (Gerrit)

    unread,
    Dec 2, 2026, 7:41:03 PM (4 days ago) Dec 2
    to Matt Reynolds, Andrey Kosyakov, Chromium IPC Reviews, Robert Paveza, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
    Attention needed from Andrey Kosyakov, Chromium IPC Reviews and Matt Reynolds

    Alexander Kyereboah added 1 comment on change 8890695

    Patchset-level comments
    Alexander Kyereboah . resolved

    We're adding DevTools Issues reporting for the Web Haptics feature to prepare for OT. PTAL, thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    • Chromium IPC Reviews
    • Matt Reynolds
    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: Ia5ba3b36d8f8eb4550adf7d11b75eb7031b5332c
    Gerrit-Change-Number: 8890695
    Gerrit-PatchSet: 4
    Gerrit-Owner: Alexander Kyereboah <akyer...@microsoft.com>
    Gerrit-Reviewer: Alexander Kyereboah <akyer...@microsoft.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
    Gerrit-Reviewer: Robert Paveza <Rob.P...@microsoft.com>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Matt Reynolds <mattre...@chromium.org>
    Gerrit-Attention: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-Comment-Date: Thu, 03 Dec 2026 00:40:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    gwsq (Gerrit)

    unread,
    Dec 2, 2026, 7:59:39 PM (4 days ago) Dec 2
    to Alexander Kyereboah, Chromium IPC Reviews, Takashi Toyoshima, Matt Reynolds, Andrey Kosyakov, Robert Paveza, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
    Attention needed from Andrey Kosyakov, Matt Reynolds and Takashi Toyoshima

    Message from gwsq on change 8890695

    From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
    IPC: toyo...@chromium.org

    📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).

    IPC reviewer(s): toyo...@chromium.org


    Reviewer source(s):
    toyo...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    • Matt Reynolds
    • Takashi Toyoshima
    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: Ia5ba3b36d8f8eb4550adf7d11b75eb7031b5332c
    Gerrit-Change-Number: 8890695
    Gerrit-PatchSet: 4
    Gerrit-Owner: Alexander Kyereboah <akyer...@microsoft.com>
    Gerrit-Reviewer: Alexander Kyereboah <akyer...@microsoft.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
    Gerrit-Reviewer: Robert Paveza <Rob.P...@microsoft.com>
    Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: gwsq
    Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Matt Reynolds <mattre...@chromium.org>
    Gerrit-Comment-Date: Thu, 03 Dec 2026 00:59:16 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alexander Kyereboah (Gerrit)

    unread,
    Dec 3, 2026, 1:46:05 PM (3 days ago) Dec 3
    to Rob Pitkin, Chromium IPC Reviews, Takashi Toyoshima, Matt Reynolds, Andrey Kosyakov, Robert Paveza, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
    Attention needed from Andrey Kosyakov, Matt Reynolds and Takashi Toyoshima

    Alexander Kyereboah added 1 comment on change 8890695

    Patchset-level comments
    Alexander Kyereboah . resolved

    Adding Rob Pitkin for visibility especially around the Android impl

    Gerrit-CC: Rob Pitkin <robp...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Matt Reynolds <mattre...@chromium.org>
    Gerrit-Comment-Date: Thu, 03 Dec 2026 18:45:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Matt Reynolds (Gerrit)

    unread,
    Dec 3, 2026, 8:14:27 PM (3 days ago) Dec 3
    to Alexander Kyereboah, Rob Pitkin, Chromium IPC Reviews, Takashi Toyoshima, Andrey Kosyakov, Robert Paveza, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
    Attention needed from Alexander Kyereboah, Andrey Kosyakov and Takashi Toyoshima

    Matt Reynolds voted and added 4 comments on change 8890695

    Votes added by Matt Reynolds <mattre...@chromium.org>

    Code-Review+1

    4 comments

    Patchset-level comments
    Matt Reynolds . resolved

    lgtm % nits

    File content/browser/haptics/haptics_manager.h
    Line 17, Patchset 4 (Latest): using PlayCallback = base::OnceCallback<void(device::mojom::HapticsResult)>;
    Matt Reynolds . unresolved

    nit: Declaration order, please move the `using` declaration above the destructor.

    https://google.github.io/styleguide/cppguide.html#declaration-order

    File content/browser/haptics/haptics_manager_impl_win.cc
    Line 29, Patchset 4 (Latest):// Collects the waveform ids advertised as supported by the current haptics
    // controller for |manager|. Returns an empty vector if none are available.
    Matt Reynolds . unresolved

    Please document `lookup_failure` in the function-level comment

    File services/device/haptics/haptics_manager_impl_unittest.cc
    Line 85, Patchset 4 (Latest): base::test::TestFuture<mojom::HapticsResult> result;
    Matt Reynolds . unresolved

    `result` records the result but never tests it, let's add an expectation for `mojom::HapticsResult::kPlatformUnsupported`

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexander Kyereboah
    • Andrey Kosyakov
    • Takashi Toyoshima
    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: Ia5ba3b36d8f8eb4550adf7d11b75eb7031b5332c
      Gerrit-Change-Number: 8890695
      Gerrit-PatchSet: 4
      Gerrit-Owner: Alexander Kyereboah <akyer...@microsoft.com>
      Gerrit-Reviewer: Alexander Kyereboah <akyer...@microsoft.com>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
      Gerrit-Reviewer: Robert Paveza <Rob.P...@microsoft.com>
      Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
      Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-CC: Rob Pitkin <robp...@chromium.org>
      Gerrit-CC: gwsq
      Gerrit-Attention: Alexander Kyereboah <akyer...@microsoft.com>
      Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
      Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Comment-Date: Fri, 04 Dec 2026 01:14:15 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alexander Kyereboah (Gerrit)

      unread,
      Dec 4, 2026, 8:07:38 PM (2 days ago) Dec 4
      to Matt Reynolds, Rob Pitkin, Chromium IPC Reviews, Takashi Toyoshima, Andrey Kosyakov, Robert Paveza, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
      Attention needed from Andrey Kosyakov and Takashi Toyoshima

      Alexander Kyereboah added 3 comments on change 8890695

      File content/browser/haptics/haptics_manager.h
      Line 17, Patchset 4: using PlayCallback = base::OnceCallback<void(device::mojom::HapticsResult)>;
      Matt Reynolds . resolved

      nit: Declaration order, please move the `using` declaration above the destructor.

      https://google.github.io/styleguide/cppguide.html#declaration-order

      Alexander Kyereboah

      Done

      File content/browser/haptics/haptics_manager_impl_win.cc
      Line 29, Patchset 4:// Collects the waveform ids advertised as supported by the current haptics

      // controller for |manager|. Returns an empty vector if none are available.
      Matt Reynolds . resolved

      Please document `lookup_failure` in the function-level comment

      Alexander Kyereboah

      Done

      File services/device/haptics/haptics_manager_impl_unittest.cc
      Line 85, Patchset 4: base::test::TestFuture<mojom::HapticsResult> result;
      Matt Reynolds . resolved

      `result` records the result but never tests it, let's add an expectation for `mojom::HapticsResult::kPlatformUnsupported`

      Alexander Kyereboah

      Added an expectation for the Windows side, but the Android one isn't deterministic.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andrey Kosyakov
      • Takashi Toyoshima
      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: Ia5ba3b36d8f8eb4550adf7d11b75eb7031b5332c
      Gerrit-Change-Number: 8890695
      Gerrit-PatchSet: 5
      Gerrit-Owner: Alexander Kyereboah <akyer...@microsoft.com>
      Gerrit-Reviewer: Alexander Kyereboah <akyer...@microsoft.com>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
      Gerrit-Reviewer: Robert Paveza <Rob.P...@microsoft.com>
      Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
      Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-CC: Rob Pitkin <robp...@chromium.org>
      Gerrit-CC: gwsq
      Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
      Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Comment-Date: Sat, 05 Dec 2026 01:07:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Matt Reynolds <mattre...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Takashi Toyoshima (Gerrit)

      unread,
      1:49 PM (1 hour ago) 1:49 PM
      to Alexander Kyereboah, Matt Reynolds, Rob Pitkin, Chromium IPC Reviews, Andrey Kosyakov, Robert Paveza, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
      Attention needed from Alexander Kyereboah and Andrey Kosyakov

      Takashi Toyoshima added 13 comments on change 8890695

      File content/browser/haptics/haptics_manager_impl.cc
      Line 21, Patchset 4: PlayCallback callback) {
      Takashi Toyoshima . unresolved

      [NIT] (IWYU)

      Include `base/functional/callback.h` directly here for `PlayCallback` (the base header only forward-declares it), and likewise include `base/notreached.h` directly where `NOTREACHED()` is added in `AuditsIssue`.

      [Basis / Citation]: [Google C++ Style Guide: Include What You Use](https://google.github.io/styleguide/cppguide.html#Include_What_You_Use)

      File content/browser/haptics/haptics_manager_impl_win.cc
      Line 31, Patchset 5 (Latest):// Sets |lookup_failure| if the controller is unavailable or a lookup fails.
      std::vector<uint16_t> GetSupportedWaveforms(
      Takashi Toyoshima . unresolved

      Please fix this INFO reported by Chromium Code Review Agent: Use backticks (`` `lookup_failure` ``) instead of legacy pipe delimiters (`|look...

      Use backticks (`` `lookup_failure` ``) instead of legacy pipe delimiters (`|lookup_failure|`) when referencing code symbols in new comments.

      KB rule: styleguide/cpp/comments/wrap-code-references-in-backticks
      Why: Codesearch and code-indexing tools use backtick pairs as a heuristic for finding C++ symbols in comments and generating cross-references, while trailing parentheses on `FooFunction()` disambiguate functions from class names and English words.
      ref: f/49aca2bf

      File content/browser/haptics/haptics_manager_impl_win_unittest.cc
      Line 662, Patchset 5 (Latest): auto* manager = InstallDeviceScenario({kHoverId});
      manager->set_send_result(E_FAIL);
      Takashi Toyoshima . unresolved

      Please fix this INFO reported by Chromium Code Review Agent: `auto* manager = InstallDeviceScenario({kHoverId});` uses `auto` where the deduc...

      `auto* manager = InstallDeviceScenario({kHoverId});` uses `auto` where the deduced type (`FakeInputHapticsManager*`) is not obvious from the call expression (compare line 753 in the same file, which spells out `FakeInputHapticsManager*`). Spell out the explicit type here and in the other newly added occurrences:

      • `content/browser/haptics/haptics_manager_impl_win_unittest.cc:672`, `682`, `693`, `710` (`FakeInputHapticsManager*`)
      • `content/browser/haptics/haptics_service_impl_browsertest.cc:265`, `312`, `363`, `400`, `549`, `578`, `594` (`base::DictValue`)
      • `content/browser/haptics/haptics_service_impl_browsertest.cc:309`, `360`, `381`, `416`, `440` (`mojo::Remote<device::mojom::HapticsService>`, matching line 575)

      KB rule: styleguide/cpp/features/auto-only-when-type-is-obvious-or-irrelevant
      Why: C++ code is usually clearer when types are explicit, especially when deduction depends on information from distant parts of the code. Readers are not necessarily on your team, so types that feel like clutter to the author and reviewer often give others useful information.
      ref: f/0f99534c

      File content/browser/haptics/haptics_service_impl.cc
      Line 41, Patchset 4: blink::mojom::AffectedFrame::New(rfh.GetDevToolsFrameToken().ToString()));
      Takashi Toyoshima . unresolved

      [NIT] (IWYU)

      Include `base/unguessable_token.h` directly for `GetDevToolsFrameToken().ToString()`, as the `RenderFrameHost` header only forward-declares `base::UnguessableToken`.

      [Basis / Citation]: [Google C++ Style Guide: Include What You Use](https://google.github.io/styleguide/cppguide.html#Include_What_You_Use)

      Line 89, Patchset 4: if (!base::FeatureList::IsEnabled(blink::features::kWebHaptics) &&
      Takashi Toyoshima . unresolved

      [CRITICAL] (Feature Gating & Mojo Remote Lifecycle)

      Returning from `HapticsServiceImpl::Create` without binding the receiver (while emitting `kFeatureDisabled` once) leaves Blink's `HeapMojoRemote` with `is_bound() == true` and `is_connected() == false` because `HapticsController` has no disconnect handler. When Blink exposes WebHaptics while `kWebHaptics` is disabled in the browser, an unactivated first call emits both `FeatureDisabled` and a contradictory `UserActivationRequired`, and subsequent activated calls pass the `is_bound()` guard and silently drop IPCs without reporting an issue.

      Separately, checking `blink::features::kWebHaptics` via `base::FeatureList` on the browser side rejects `--enable-blink-features=WebHaptics`. Consider either calling `ResetWithReason` on the receiver with a matching disconnect handler in `HapticsController` (or binding the service and reporting `kFeatureDisabled` per `PlayHaptics` call), and confirm whether `--enable-blink-features=WebHaptics` should be honored or gated alongside the `base::Feature`.

      [Basis / Citation]: [mojo::Remote::is_bound() vs is_connected()](https://source.chromium.org/chromium/chromium/src/+/main:mojo/public/cpp/bindings/remote.h;l=113-138), [DocumentService::ResetWithReasonAndDeleteThis()](https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/document_service.h;l=148-154), [kEnableBlinkFeatures handling](https://source.chromium.org/chromium/chromium/src/+/main:content/child/runtime_features.cc;l=594-597), [Mojo Style Guide: Privileged Feature Checks](https://chromium.googlesource.com/chromium/src/+/main/docs/security/mojo.md#not-yet-shipped-features-should-be-feature-checked-on-the-privileged-side)

      File content/browser/haptics/haptics_service_impl_browsertest.cc
      Line 28, Patchset 4:#include "content/public/test/content_browser_test.h"
      Takashi Toyoshima . unresolved

      [NIT] (Header Hygiene & IWYU)

      After migrating to `DevToolsProtocolTest`, `content/public/test/content_browser_test.h` is unused; please remove it and include `base/unguessable_token.h` directly for the `GetDevToolsFrameToken().ToString()` assertions.

      [Basis / Citation]: [Chromium C++ Dos and Don'ts: Minimize Code in Headers](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-dos-and-donts.md#minimize-code-in-headers), [Google C++ Style Guide: Include What You Use](https://google.github.io/styleguide/cppguide.html#Include_What_You_Use)

      Line 326, Patchset 5 (Latest): base::BindLambdaForTesting([&]() -> std::unique_ptr<HapticsManager> {
      auto mock = std::make_unique<MockHapticsManager>();
      EXPECT_CALL(*mock, PlayHaptics(testing::_, 0.0, testing::_))
      .Times(2)
      .WillRepeatedly([](device::mojom::HapticEffect, double,
      HapticsManager::PlayCallback callback) {
      std::move(callback).Run(device::mojom::HapticsResult::kSubmitted);
      });
      EXPECT_CALL(*mock, PlayHaptics(testing::_, 0.5, testing::_))
      .WillOnce([&](device::mojom::HapticEffect, double,
      HapticsManager::PlayCallback callback) {
      std::move(callback).Run(device::mojom::HapticsResult::kSubmitted);
      submitted.SetValue();
      });
      return mock;
      }));
      ASSERT_TRUE(ExecJs(web_contents(), R"(
      Takashi Toyoshima . unresolved

      Please fix this WARNING reported by Chromium Code Review Agent: The lambda passed to `HapticsServiceImpl::SetHapticsManagerFactoryForTesting(......

      The lambda passed to `HapticsServiceImpl::SetHapticsManagerFactoryForTesting(...)` (line 326) and its nested `WillOnce` lambda (line 335) use default by-reference capture (`[&]`), capturing the stack-local `base::test::TestFuture<void> submitted`. Because `SetHapticsManagerFactoryForTesting` stores the factory in a process-global `base::NoDestructor` singleton that is not cleared until `TearDownOnMainThread()`, and the returned `MockHapticsManager` is owned by `HapticsServiceImpl`, either can outlive `submitted` (for example if an `ASSERT_*` exits the test early or another binding occurs during teardown). Use explicit captures (e.g., `[&submitted]`) and clear the factory before `submitted` goes out of scope.

      KB rule: styleguide/cpp/features/lambda-default-ref-capture-only-if-short-lived
      Why: Variable capture is a source of dangling-pointer bugs when a lambda escapes the current scope; with a default capture, the lambda's use of a reference to a local, or of `this`, may not be apparent on a cursory inspection.
      ref: f/d2c1d644

      File services/device/haptics/android/java/src/org/chromium/device/haptics/HapticsManagerAndroid.java
      Line 97, Patchset 4: public int playHaptics(int effect, double intensity) {
      Takashi Toyoshima . unresolved

      Sorry, I'm not a specialist on JNI, but if this comment is useful...

      ----

      [NIT] (JNI Boundary Type Safety)

      `playHaptics` passes `effect` and returns its result as raw `int`s with manual `static_cast`s on the C++ side. Annotating the return value and `effect` with `@JniType("device::mojom::HapticsResult") @HapticsResult.EnumType int` and `@JniType("device::mojom::HapticEffect") @HapticEffect.EnumType int` lets JNI Zero handle the enum conversions directly.

      [Basis / Citation]: [JNI Zero Guide: Automatic Type Conversions using @JniType](https://chromium.googlesource.com/chromium/src/+/main/third_party/jni_zero/README.md#automatic-type-conversions-using-jnitype-jnitype), [PrimitiveConvert for C++ enums](https://source.chromium.org/chromium/chromium/src/+/main:third_party/jni_zero/type_conversions.h;l=85-102)

      File services/device/public/mojom/device_service.mojom
      Line 76, Patchset 4: BindHapticsService(pending_receiver<HapticsBackend> receiver);
      Takashi Toyoshima . unresolved

      [NIT] (API Naming Consistency)

      Sibling `Bind*` methods on `DeviceService` match their bound Mojom interface 1:1, whereas `BindHapticsService` now binds `pending_receiver<HapticsBackend>`. Renaming `BindHapticsService`, `GetHapticsServiceBinderOverride`, `ScopedHapticsServiceOverrider`, `MockHapticsService`, and `device_haptics_service_` (along with README references) to `*HapticsBackend*` would avoid confusion with the renderer-facing `mojom::HapticsService`.

      [Basis / Citation]: [DeviceService::Bind* naming convention](https://source.chromium.org/chromium/chromium/src/+/main:services/device/public/mojom/device_service.mojom;l=39-113), [HapticsService vs HapticsBackend](https://source.chromium.org/chromium/chromium/src/+/main:services/device/public/mojom/haptics.mojom;l=31-52)

      File services/device/public/mojom/haptics.mojom
      Line 38, Patchset 4:enum HapticsResult {
      Takashi Toyoshima . unresolved

      [NIT] (Mojo Documentation)

      Consider adding brief Mojom comments on the `HapticsResult` enumerators and on `HapticsIssueReason` / `HapticsIssueDetails` to clarify non-obvious semantics—for example, that `kSubmitted` covers Android `0.0` no-ops and Windows fallback acceptance, and which `HapticsIssueReason` values originate in Blink versus the browser.

      [Basis / Citation]: [Mojo Style Guide: Documentation](https://chromium.googlesource.com/chromium/src/+/main/docs/security/mojo.md#documentation)

      File third_party/blink/renderer/core/inspector/inspector_audits_issue.h
      Line 137, Patchset 4: static void ReportHapticsIssue(LocalDOMWindow* window,
      Takashi Toyoshima . unresolved

      [SUGGESTION] (Inputs & Outputs)

      `AuditsIssue::ReportHapticsIssue` unconditionally dereferences `window` and callers already ensure it is non-null. Change the parameter from `LocalDOMWindow*` to `LocalDOMWindow&` to make the non-null contract explicit at the API boundary.

      [Basis / Citation]: [Google C++ Style Guide: Inputs and Outputs](https://google.github.io/styleguide/cppguide.html#Inputs_and_Outputs)

      File third_party/blink/renderer/core/inspector/inspector_audits_issue.cc
      Line 105, Patchset 5 (Latest):void AuditsIssue::ReportHapticsIssue(LocalDOMWindow* window,
      mojom::blink::HapticsIssueReason reason) {
      String protocol_reason;
      Takashi Toyoshima . unresolved

      Please fix this INFO reported by Chromium Code Review Agent: `AuditsIssue::ReportHapticsIssue` is declared `static` in `inspector_audits_issu...

      `AuditsIssue::ReportHapticsIssue` is declared `static` in `inspector_audits_issue.h`; precede its out-of-line definition with a standalone `// static` comment.

      KB rule: blink/general/add-static-comment-above-static-method-definitions-in-cc
      Why: In C++, the 'static' storage class specifier is permitted only on declarations inside class bodies in header files, not on out-of-line member function definitions. Adding a standalone '// static' comment immediately above the implementation definition makes the static scope immediately obvious to readers and reviewers without cross-referencing the header. Keeping documentation comments in the header provides a single source of truth for callers and prevents doc comments from drifting out of sync.
      ref: f/cdf89dc3

      File third_party/blink/renderer/modules/haptics/haptics_controller.cc
      Line 70, Patchset 4:HapticsController::HapticsController(Navigator& navigator)
      Takashi Toyoshima . unresolved

      [CRITICAL] (Window Reuse State Drift & Silent Issue Suppression)

      `HapticsController` caches `blocked_reason_` and binds `haptics_service_` once at construction as a `Supplement<Navigator>`. However, `LocalDOMWindow::ClearForReuse()` preserves `navigator_` across same-origin window reuse (such as initial `about:blank` transitioning to a committed document), even though the new document applies a new `PermissionsPolicy` and the browser replaces `DocumentAssociatedData`.

      After window reuse, `HapticsController` can rely on a stale `blocked_reason_` or send over a disconnected pipe whose `is_bound()` remains `true`, silently dropping calls without reporting `PermissionsPolicyBlocked`. Re-evaluate fenced-frame and permissions-policy eligibility per `PlayHaptics()` call (or reset/rebind controller state when the window's `Document` changes).

      [Basis / Citation]: [LocalDOMWindow::ClearForReuse()](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/local_dom_window.cc;l=272-289), [LocalDOMWindow::navigator_ lifetime](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/local_dom_window.h;l=685), [mojo::Remote::is_bound() vs is_connected()](https://source.chromium.org/chromium/chromium/src/+/main:mojo/public/cpp/bindings/remote.h;l=113-138)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alexander Kyereboah
      • Andrey Kosyakov
      Gerrit-Attention: Alexander Kyereboah <akyer...@microsoft.com>
      Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Comment-Date: Sun, 06 Dec 2026 18:48:57 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages