Add experimental Target.queryTabs CDP command [chromium/src : main]

0 views
Skip to first unread message

Nick Sweeting (Gerrit)

unread,
May 1, 2026, 3:44:12 PM (4 days ago) May 1
to Chromium LUCI CQ, Danil Somsikov, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org
Attention needed from Danil Somsikov

Nick Sweeting added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Nick Sweeting . resolved

If you think this new command would belong better under `Page.queryTabs()` or `Browser.queryTabs()` let me know, happy to move it or change the naming.

Also in the meantime I implemented a way to register custom CDP commands in Chrome without needing chromium patches, maybe be useful to people following this thread and looking for a workaround: https://github.com/pirate/magic-cdp

Open in Gerrit

Related details

Attention is currently required from:
  • Danil Somsikov
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: I3fdfe42f2141f8e409b1d2e243a26a77bbfdcde6
Gerrit-Change-Number: 7787097
Gerrit-PatchSet: 2
Gerrit-Owner: Nick Sweeting <ger...@sweeting.me>
Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
Gerrit-Reviewer: Nick Sweeting <ger...@sweeting.me>
Gerrit-Attention: Danil Somsikov <d...@chromium.org>
Gerrit-Comment-Date: Fri, 01 May 2026 19:44:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Rudenko (Gerrit)

unread,
12:27 PM (2 hours ago) 12:27 PM
to Nick Sweeting, Andrey Kosyakov, Chromium LUCI CQ, Danil Somsikov, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org
Attention needed from Danil Somsikov and Nick Sweeting

Alex Rudenko added 1 comment

File third_party/blink/public/devtools_protocol/domains/Target.pdl
Line 249, Patchset 2 (Latest): experimental command queryTabs
Alex Rudenko . unresolved

instead of a separate command for querying the tabs we should add a new data structure to https://chromedevtools.github.io/devtools-protocol/tot/Target/#type-TargetInfo called `embedderData` where embedders such as chrome/ could provide implementation specific information (such as tab index, active or not, pinned or not, group id). TargetInfo already contains url and title. For window detection we already have https://chromedevtools.github.io/devtools-protocol/tot/Browser/#method-getWindowForTarget. This would allow different embedders to provide different data (for instance, content shell or headless shell might not have all tab features). Additionally, we should probably only populate embedderData for targets of type "tab".

The entry point to targetInfo is here https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/protocol/target_handler.cc;l=96;drc=fc44a91d176d55c9c43a89bd7eefce89d96d0472 We should use the delegate to get embedder-specific information for a target.

I would suggest we start with one feature directly requested in the attached issue, i.e., if the tab is selected in the window. With split views and multiple windows I think it is possible that multiple tab targets are selected at once within one window and across multiple windows..

Open in Gerrit

Related details

Attention is currently required from:
  • Danil Somsikov
  • Nick Sweeting
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: I3fdfe42f2141f8e409b1d2e243a26a77bbfdcde6
    Gerrit-Change-Number: 7787097
    Gerrit-PatchSet: 2
    Gerrit-Owner: Nick Sweeting <ger...@sweeting.me>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Nick Sweeting <ger...@sweeting.me>
    Gerrit-CC: Alex Rudenko <alexr...@chromium.org>
    Gerrit-CC: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Nick Sweeting <ger...@sweeting.me>
    Gerrit-Attention: Danil Somsikov <d...@chromium.org>
    Gerrit-Comment-Date: Tue, 05 May 2026 16:26:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages