Webium: Add wpt test support for webui browser and a basic test [chromium/src : main]

0 views
Skip to first unread message

Liang Zhao (Gerrit)

unread,
Sep 30, 2025, 3:22:21 PM (13 days ago) Sep 30
to Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
Attention needed from Liang Zhao

Message from Liang Zhao

Set Ready For Review

Open in Gerrit

Related details

Attention is currently required from:
  • Liang Zhao
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
Gerrit-Change-Number: 6990317
Gerrit-PatchSet: 6
Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
Gerrit-Comment-Date: Tue, 30 Sep 2025 19:22:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Liang Zhao (Gerrit)

unread,
Sep 30, 2025, 3:24:37 PM (13 days ago) Sep 30
to Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
Attention needed from Keren Zhu

Liang Zhao added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Liang Zhao . resolved

Keren, could you review the change first before I add other code owners?
Note that the test failure of ActorMouseMoveToolBrowserTest.MouseMoveTool_Events/Disabled should be unrelated to this change. I could not repro it and previous test run with the same code change didn't fail the test.

Open in Gerrit

Related details

Attention is currently required from:
  • Keren Zhu
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
Gerrit-Change-Number: 6990317
Gerrit-PatchSet: 6
Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
Gerrit-Attention: Keren Zhu <kere...@chromium.org>
Gerrit-Comment-Date: Tue, 30 Sep 2025 19:24:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Keren Zhu (Gerrit)

unread,
Sep 30, 2025, 4:03:15 PM (13 days ago) Sep 30
to Liang Zhao, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
Attention needed from Liang Zhao

Keren Zhu added 1 comment

File content/public/browser/devtools_manager_delegate.h
Line 37, Patchset 6 (Latest): virtual std::string GetTargetType(WebContents* web_contents);
Keren Zhu . unresolved

Can we update GetTargetType() to return kBrowser for the top-chrome UI? If not, do you know what will break?

Open in Gerrit

Related details

Attention is currently required from:
  • Liang Zhao
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
    Gerrit-Change-Number: 6990317
    Gerrit-PatchSet: 6
    Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
    Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
    Gerrit-Comment-Date: Tue, 30 Sep 2025 20:03:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Liang Zhao (Gerrit)

    unread,
    Sep 30, 2025, 4:54:10 PM (13 days ago) Sep 30
    to Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
    Attention needed from Keren Zhu

    Liang Zhao added 1 comment

    File content/public/browser/devtools_manager_delegate.h
    Line 37, Patchset 6 (Latest): virtual std::string GetTargetType(WebContents* web_contents);
    Keren Zhu . unresolved

    Can we update GetTargetType() to return kBrowser for the top-chrome UI? If not, do you know what will break?

    Liang Zhao

    I thought about that, but decided not to do that. We probably should add code owners for comments.

    Hiding "Browser" targets should be doable with modifying GetTargetType().

    Getting RenderFrameDevToolsAgentHost::GetType() and RenderFrameDevToolsAgentHost::GetParentId() to work as expected would require different handling of guest views in them and the some dependency on what GetTargetType() would return for guest view contents and use that knowledge to differentiate tab and guest view contents, like if GetTargetType() returns Page, then it is Page and not guest view. But if the guest view happens to be used to host pages from an extension, then it would be hard to control what would be returned.

    Introducing a new target type for WebContents (not for main frame of it) with Browser and Tab type seems more reliable to me.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keren Zhu
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
    Gerrit-Change-Number: 6990317
    Gerrit-PatchSet: 6
    Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Comment-Date: Tue, 30 Sep 2025 20:54:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Keren Zhu <kere...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Liang Zhao (Gerrit)

    unread,
    Oct 1, 2025, 12:48:20 PM (13 days ago) Oct 1
    to Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
    Attention needed from Keren Zhu

    Liang Zhao added 1 comment

    File content/public/browser/devtools_manager_delegate.h
    Line 37, Patchset 6 (Latest): virtual std::string GetTargetType(WebContents* web_contents);
    Keren Zhu . unresolved

    Can we update GetTargetType() to return kBrowser for the top-chrome UI? If not, do you know what will break?

    Liang Zhao

    I thought about that, but decided not to do that. We probably should add code owners for comments.

    Hiding "Browser" targets should be doable with modifying GetTargetType().

    Getting RenderFrameDevToolsAgentHost::GetType() and RenderFrameDevToolsAgentHost::GetParentId() to work as expected would require different handling of guest views in them and the some dependency on what GetTargetType() would return for guest view contents and use that knowledge to differentiate tab and guest view contents, like if GetTargetType() returns Page, then it is Page and not guest view. But if the guest view happens to be used to host pages from an extension, then it would be hard to control what would be returned.

    Introducing a new target type for WebContents (not for main frame of it) with Browser and Tab type seems more reliable to me.

    Liang Zhao

    Thought about this overnight, it might be doable.
    Existing code does not return Tab or Browser type from GetTargetType(), so we can change GetTargetType() to return them for webui browser ui and tab, and update the current caller to use the return value of GetTargetType() the same way as GetLogicTargetType(), and map the logic Browser and Tab type to Page when using it as the main frame target type.
    I'll update the code to do that.

    Gerrit-Comment-Date: Wed, 01 Oct 2025 16:48:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Keren Zhu <kere...@chromium.org>
    Comment-In-Reply-To: Liang Zhao <lz...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Liang Zhao (Gerrit)

    unread,
    Oct 1, 2025, 3:04:14 PM (12 days ago) Oct 1
    to Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
    Attention needed from Keren Zhu

    Liang Zhao added 1 comment

    File content/public/browser/devtools_manager_delegate.h
    Line 37, Patchset 6: virtual std::string GetTargetType(WebContents* web_contents);
    Keren Zhu . resolved

    Can we update GetTargetType() to return kBrowser for the top-chrome UI? If not, do you know what will break?

    Liang Zhao

    I thought about that, but decided not to do that. We probably should add code owners for comments.

    Hiding "Browser" targets should be doable with modifying GetTargetType().

    Getting RenderFrameDevToolsAgentHost::GetType() and RenderFrameDevToolsAgentHost::GetParentId() to work as expected would require different handling of guest views in them and the some dependency on what GetTargetType() would return for guest view contents and use that knowledge to differentiate tab and guest view contents, like if GetTargetType() returns Page, then it is Page and not guest view. But if the guest view happens to be used to host pages from an extension, then it would be hard to control what would be returned.

    Introducing a new target type for WebContents (not for main frame of it) with Browser and Tab type seems more reliable to me.

    Liang Zhao

    Thought about this overnight, it might be doable.
    Existing code does not return Tab or Browser type from GetTargetType(), so we can change GetTargetType() to return them for webui browser ui and tab, and update the current caller to use the return value of GetTargetType() the same way as GetLogicTargetType(), and map the logic Browser and Tab type to Page when using it as the main frame target type.
    I'll update the code to do that.

    Liang Zhao

    Merged logic target type into GetTargetType()

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keren Zhu
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
    Gerrit-Change-Number: 6990317
    Gerrit-PatchSet: 7
    Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
    Gerrit-Comment-Date: Wed, 01 Oct 2025 19:04:03 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keren Zhu (Gerrit)

    unread,
    Oct 2, 2025, 12:42:16 AM (12 days ago) Oct 2
    to Liang Zhao, Dmitry Gozman, Mason Freed, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
    Attention needed from Dmitry Gozman, Liang Zhao and Mason Freed

    Keren Zhu added 9 comments

    Commit Message
    Line 21, Patchset 7 (Latest):parameter for webui browser to report logic target type for WebContents
    Keren Zhu . unresolved

    nit: "logic" is a noun. This should be "logical".

    File chrome/browser/devtools/chrome_devtools_manager_delegate.cc
    Line 279, Patchset 7 (Latest): web_contents->GetUserData(
    webui_browser::GetWebShellWebContentsUserDataKey())) {
    Keren Zhu . unresolved

    Instead of using the user data as a proxy, can we add a helper function for this check? e.g. webui_browser::IsBrowserUIWebContents()?

    File chrome/browser/ui/webui_browser/webui_browser_browsertest.cc
    Line 24, Patchset 7 (Latest):class WebUIBrowserTest : public InProcessBrowserTest,
    Keren Zhu . unresolved

    Can we make a new test harness for devtools? It can be a subclass of WebUIBrowserTest.

    Line 94, Patchset 7 (Latest): // Verify DevTools target types.
    Keren Zhu . unresolved

    Can we make a new test for devtools targets? Each test should focus on one capability / feature.

    Line 116, Patchset 7 (Latest): // Only expect targets for tab WebContents and its main frame.
    EXPECT_EQ(hosts.size(), 2U);
    EXPECT_EQ(tab_count, 1);
    EXPECT_EQ(page_count, 1);
    Keren Zhu . unresolved

    q: looks like the browser ui WebContents is not a DevTools host. Can it still be inspected by DevTools?

    File chrome/common/chrome_features.cc
    Line 1628, Patchset 7 (Latest):const base::FeatureParam<bool> kWebiumReportLogicDevToolsTargetType{
    Keren Zhu . unresolved

    Can we add a description of this parameter?

    File content/browser/devtools/render_frame_devtools_agent_host.cc
    Line 244, Patchset 7 (Latest): if (delegate && (delegate->GetTargetType(wc) == kTypeBrowser)) {
    Keren Zhu . unresolved

    If I understanding correctly this is excluding the browser ui from DevTools target list. Will the browser ui still be inspectable?

    Line 850, Patchset 7 (Latest): if ((type == kTypeTab) || (type == kTypeBrowser)) {
    return kTypePage;
    Keren Zhu . unresolved

    I have trouble understanding this overriding. Can you explain the logic?

    File content/public/browser/devtools_manager_delegate.h
    Line 37, Patchset 6: virtual std::string GetTargetType(WebContents* web_contents);
    Keren Zhu . unresolved

    Can we update GetTargetType() to return kBrowser for the top-chrome UI? If not, do you know what will break?

    Liang Zhao

    I thought about that, but decided not to do that. We probably should add code owners for comments.

    Hiding "Browser" targets should be doable with modifying GetTargetType().

    Getting RenderFrameDevToolsAgentHost::GetType() and RenderFrameDevToolsAgentHost::GetParentId() to work as expected would require different handling of guest views in them and the some dependency on what GetTargetType() would return for guest view contents and use that knowledge to differentiate tab and guest view contents, like if GetTargetType() returns Page, then it is Page and not guest view. But if the guest view happens to be used to host pages from an extension, then it would be hard to control what would be returned.

    Introducing a new target type for WebContents (not for main frame of it) with Browser and Tab type seems more reliable to me.

    Liang Zhao

    Thought about this overnight, it might be doable.
    Existing code does not return Tab or Browser type from GetTargetType(), so we can change GetTargetType() to return them for webui browser ui and tab, and update the current caller to use the return value of GetTargetType() the same way as GetLogicTargetType(), and map the logic Browser and Tab type to Page when using it as the main frame target type.
    I'll update the code to do that.

    Liang Zhao

    Merged logic target type into GetTargetType()

    Keren Zhu

    Thank you for working on this! I am not too familiar with DevTools and it took me more time than expected to review.

    Hiding "Browser" targets should be doable with modifying GetTargetType().

    It is not obvious to me why we want to hide "Browser" targets. Can you help me understand it?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dmitry Gozman
    • Liang Zhao
    • Mason Freed
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
      Gerrit-Change-Number: 6990317
      Gerrit-PatchSet: 7
      Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
      Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
      Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
      Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-Attention: Mason Freed <mas...@chromium.org>
      Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
      Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
      Gerrit-Comment-Date: Thu, 02 Oct 2025 04:42:11 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mason Freed (Gerrit)

      unread,
      Oct 2, 2025, 1:49:14 PM (12 days ago) Oct 2
      to Liang Zhao, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
      Attention needed from Dmitry Gozman and Liang Zhao

      Mason Freed voted and added 1 comment

      Votes added by Mason Freed

      Code-Review+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 7 (Latest):
      Mason Freed . resolved

      third_party/blink/web_tests/VirtualTestSuites LGTM

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dmitry Gozman
      • Liang Zhao
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
        Gerrit-Change-Number: 6990317
        Gerrit-PatchSet: 7
        Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
        Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
        Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
        Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
        Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
        Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
        Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
        Gerrit-Comment-Date: Thu, 02 Oct 2025 17:49:03 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Liang Zhao (Gerrit)

        unread,
        Oct 2, 2025, 3:20:19 PM (11 days ago) Oct 2
        to Mason Freed, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
        Attention needed from Dmitry Gozman, Keren Zhu and Mason Freed

        Liang Zhao added 9 comments

        Commit Message
        Line 21, Patchset 7:parameter for webui browser to report logic target type for WebContents
        Keren Zhu . resolved

        nit: "logic" is a noun. This should be "logical".

        Liang Zhao

        Done

        File chrome/browser/devtools/chrome_devtools_manager_delegate.cc
        Line 279, Patchset 7: web_contents->GetUserData(
        webui_browser::GetWebShellWebContentsUserDataKey())) {
        Keren Zhu . resolved

        Instead of using the user data as a proxy, can we add a helper function for this check? e.g. webui_browser::IsBrowserUIWebContents()?

        Liang Zhao

        Done

        File chrome/browser/ui/webui_browser/webui_browser_browsertest.cc
        Line 24, Patchset 7:class WebUIBrowserTest : public InProcessBrowserTest,
        Keren Zhu . resolved

        Can we make a new test harness for devtools? It can be a subclass of WebUIBrowserTest.

        Liang Zhao

        Done

        Line 94, Patchset 7: // Verify DevTools target types.
        Keren Zhu . resolved

        Can we make a new test for devtools targets? Each test should focus on one capability / feature.

        Liang Zhao

        Done

        Line 116, Patchset 7: // Only expect targets for tab WebContents and its main frame.

        EXPECT_EQ(hosts.size(), 2U);
        EXPECT_EQ(tab_count, 1);
        EXPECT_EQ(page_count, 1);
        Keren Zhu . resolved

        q: looks like the browser ui WebContents is not a DevTools host. Can it still be inspected by DevTools?

        Liang Zhao

        Yes, it can still be inspected, like by right click on the context menu. That's directly creating agent host from a WebContents. This change only makes not visible from enumeration.

        File chrome/common/chrome_features.cc
        Line 1628, Patchset 7:const base::FeatureParam<bool> kWebiumReportLogicDevToolsTargetType{
        Keren Zhu . resolved

        Can we add a description of this parameter?

        Liang Zhao

        Done

        File content/browser/devtools/render_frame_devtools_agent_host.cc
        Line 244, Patchset 7: if (delegate && (delegate->GetTargetType(wc) == kTypeBrowser)) {
        Keren Zhu . resolved

        If I understanding correctly this is excluding the browser ui from DevTools target list. Will the browser ui still be inspectable?

        Liang Zhao

        It is still inspectable, like from context menu.

        Line 850, Patchset 7: if ((type == kTypeTab) || (type == kTypeBrowser)) {
        return kTypePage;
        Keren Zhu . resolved

        I have trouble understanding this overriding. Can you explain the logic?

        Liang Zhao

        Added comment: // kTypeTab is the type for WebContentsDevToolsAgentHost and kTypeBrowser is for BrowserDevToolsAgentHost. Replace these logic types with kTypePage which is a proper for RenderFrameDevToolsAgentHost.

        File content/public/browser/devtools_manager_delegate.h
        Line 37, Patchset 6: virtual std::string GetTargetType(WebContents* web_contents);
        Keren Zhu . resolved

        Can we update GetTargetType() to return kBrowser for the top-chrome UI? If not, do you know what will break?

        Liang Zhao

        I thought about that, but decided not to do that. We probably should add code owners for comments.

        Hiding "Browser" targets should be doable with modifying GetTargetType().

        Getting RenderFrameDevToolsAgentHost::GetType() and RenderFrameDevToolsAgentHost::GetParentId() to work as expected would require different handling of guest views in them and the some dependency on what GetTargetType() would return for guest view contents and use that knowledge to differentiate tab and guest view contents, like if GetTargetType() returns Page, then it is Page and not guest view. But if the guest view happens to be used to host pages from an extension, then it would be hard to control what would be returned.

        Introducing a new target type for WebContents (not for main frame of it) with Browser and Tab type seems more reliable to me.

        Liang Zhao

        Thought about this overnight, it might be doable.
        Existing code does not return Tab or Browser type from GetTargetType(), so we can change GetTargetType() to return them for webui browser ui and tab, and update the current caller to use the return value of GetTargetType() the same way as GetLogicTargetType(), and map the logic Browser and Tab type to Page when using it as the main frame target type.
        I'll update the code to do that.

        Liang Zhao

        Merged logic target type into GetTargetType()

        Keren Zhu

        Thank you for working on this! I am not too familiar with DevTools and it took me more time than expected to review.

        Hiding "Browser" targets should be doable with modifying GetTargetType().

        It is not obvious to me why we want to hide "Browser" targets. Can you help me understand it?

        Liang Zhao

        Browser means BrowserDevToolsAgentHost with different supported methods. As the webui browser web page is not real BrowserDevToolsAgentHost that supports those operations, we just hide it. The real BrowserDevToolsAgentHost is still there and reported.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Dmitry Gozman
        • Keren Zhu
        • Mason Freed
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
          Gerrit-Change-Number: 6990317
          Gerrit-PatchSet: 10
          Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
          Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
          Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
          Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
          Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
          Gerrit-Attention: Mason Freed <mas...@chromium.org>
          Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
          Gerrit-Attention: Keren Zhu <kere...@chromium.org>
          Gerrit-Comment-Date: Thu, 02 Oct 2025 19:20:08 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Keren Zhu (Gerrit)

          unread,
          Oct 2, 2025, 4:02:49 PM (11 days ago) Oct 2
          to Liang Zhao, Mason Freed, Dmitry Gozman, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
          Attention needed from Dmitry Gozman, Liang Zhao and Mason Freed

          Keren Zhu added 3 comments

          File chrome/browser/ui/webui_browser/webui_browser_browsertest.cc
          Line 116, Patchset 7: // Only expect targets for tab WebContents and its main frame.
          EXPECT_EQ(hosts.size(), 2U);
          EXPECT_EQ(tab_count, 1);
          EXPECT_EQ(page_count, 1);
          Keren Zhu . resolved

          q: looks like the browser ui WebContents is not a DevTools host. Can it still be inspected by DevTools?

          Liang Zhao

          Yes, it can still be inspected, like by right click on the context menu. That's directly creating agent host from a WebContents. This change only makes not visible from enumeration.

          Keren Zhu

          Does it mean that it does not show up from chrome://inspect?

          File content/browser/devtools/render_frame_devtools_agent_host.cc
          Line 850, Patchset 7: if ((type == kTypeTab) || (type == kTypeBrowser)) {
          return kTypePage;
          Keren Zhu . resolved

          I have trouble understanding this overriding. Can you explain the logic?

          Liang Zhao

          Added comment: // kTypeTab is the type for WebContentsDevToolsAgentHost and kTypeBrowser is for BrowserDevToolsAgentHost. Replace these logic types with kTypePage which is a proper for RenderFrameDevToolsAgentHost.

          Keren Zhu

          Make sense to me. I was not aware that the difference between WebContentsDevToolsAgentHost and BrowserDevToolsAgentHost.

          File content/public/browser/devtools_manager_delegate.h
          Line 37, Patchset 6: virtual std::string GetTargetType(WebContents* web_contents);
          Keren Zhu . unresolved

          Can we update GetTargetType() to return kBrowser for the top-chrome UI? If not, do you know what will break?

          Liang Zhao

          I thought about that, but decided not to do that. We probably should add code owners for comments.

          Hiding "Browser" targets should be doable with modifying GetTargetType().

          Getting RenderFrameDevToolsAgentHost::GetType() and RenderFrameDevToolsAgentHost::GetParentId() to work as expected would require different handling of guest views in them and the some dependency on what GetTargetType() would return for guest view contents and use that knowledge to differentiate tab and guest view contents, like if GetTargetType() returns Page, then it is Page and not guest view. But if the guest view happens to be used to host pages from an extension, then it would be hard to control what would be returned.

          Introducing a new target type for WebContents (not for main frame of it) with Browser and Tab type seems more reliable to me.

          Liang Zhao

          Thought about this overnight, it might be doable.
          Existing code does not return Tab or Browser type from GetTargetType(), so we can change GetTargetType() to return them for webui browser ui and tab, and update the current caller to use the return value of GetTargetType() the same way as GetLogicTargetType(), and map the logic Browser and Tab type to Page when using it as the main frame target type.
          I'll update the code to do that.

          Liang Zhao

          Merged logic target type into GetTargetType()

          Keren Zhu

          Thank you for working on this! I am not too familiar with DevTools and it took me more time than expected to review.

          Hiding "Browser" targets should be doable with modifying GetTargetType().

          It is not obvious to me why we want to hide "Browser" targets. Can you help me understand it?

          Liang Zhao

          Browser means BrowserDevToolsAgentHost with different supported methods. As the webui browser web page is not real BrowserDevToolsAgentHost that supports those operations, we just hide it. The real BrowserDevToolsAgentHost is still there and reported.

          Keren Zhu

          Can you check if my understanding is correct? kTypeBrowser type DevTools host is the entry point for chrome driver. It reports other inspactable targets in the browser (e.g. pages, service workers, etc). Therefore the browser ui WebContents shouldn't be reported as the Browser type.

          WDYT of introducing a new kTypeBrowserUI type? The overriding of kTypeTab and kTypeBrowserUI to kPage in `RenderFrameDevToolsAgentHost::GetType()` will become reasonable, since both Tab and BrowserUI are web pages.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Dmitry Gozman
          • Liang Zhao
          • Mason Freed
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
            Gerrit-Change-Number: 6990317
            Gerrit-PatchSet: 10
            Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
            Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
            Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
            Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
            Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
            Gerrit-Attention: Mason Freed <mas...@chromium.org>
            Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
            Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
            Gerrit-Comment-Date: Thu, 02 Oct 2025 20:02:44 +0000
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Liang Zhao (Gerrit)

            unread,
            Oct 2, 2025, 7:00:50 PM (11 days ago) Oct 2
            to Mason Freed, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
            Attention needed from Dmitry Gozman, Keren Zhu and Mason Freed

            Liang Zhao added 2 comments

            File chrome/browser/ui/webui_browser/webui_browser_browsertest.cc
            Line 116, Patchset 7: // Only expect targets for tab WebContents and its main frame.
            EXPECT_EQ(hosts.size(), 2U);
            EXPECT_EQ(tab_count, 1);
            EXPECT_EQ(page_count, 1);
            Keren Zhu . resolved

            q: looks like the browser ui WebContents is not a DevTools host. Can it still be inspected by DevTools?

            Liang Zhao

            Yes, it can still be inspected, like by right click on the context menu. That's directly creating agent host from a WebContents. This change only makes not visible from enumeration.

            Keren Zhu

            Does it mean that it does not show up from chrome://inspect?

            Liang Zhao

            That is correct. It will not show up from chrome://inspect.

            File content/public/browser/devtools_manager_delegate.h
            Line 37, Patchset 6: virtual std::string GetTargetType(WebContents* web_contents);
            Keren Zhu . resolved

            Can we update GetTargetType() to return kBrowser for the top-chrome UI? If not, do you know what will break?

            Liang Zhao

            I thought about that, but decided not to do that. We probably should add code owners for comments.

            Hiding "Browser" targets should be doable with modifying GetTargetType().

            Getting RenderFrameDevToolsAgentHost::GetType() and RenderFrameDevToolsAgentHost::GetParentId() to work as expected would require different handling of guest views in them and the some dependency on what GetTargetType() would return for guest view contents and use that knowledge to differentiate tab and guest view contents, like if GetTargetType() returns Page, then it is Page and not guest view. But if the guest view happens to be used to host pages from an extension, then it would be hard to control what would be returned.

            Introducing a new target type for WebContents (not for main frame of it) with Browser and Tab type seems more reliable to me.

            Liang Zhao

            Thought about this overnight, it might be doable.
            Existing code does not return Tab or Browser type from GetTargetType(), so we can change GetTargetType() to return them for webui browser ui and tab, and update the current caller to use the return value of GetTargetType() the same way as GetLogicTargetType(), and map the logic Browser and Tab type to Page when using it as the main frame target type.
            I'll update the code to do that.

            Liang Zhao

            Merged logic target type into GetTargetType()

            Keren Zhu

            Thank you for working on this! I am not too familiar with DevTools and it took me more time than expected to review.

            Hiding "Browser" targets should be doable with modifying GetTargetType().

            It is not obvious to me why we want to hide "Browser" targets. Can you help me understand it?

            Liang Zhao

            Browser means BrowserDevToolsAgentHost with different supported methods. As the webui browser web page is not real BrowserDevToolsAgentHost that supports those operations, we just hide it. The real BrowserDevToolsAgentHost is still there and reported.

            Keren Zhu

            Can you check if my understanding is correct? kTypeBrowser type DevTools host is the entry point for chrome driver. It reports other inspactable targets in the browser (e.g. pages, service workers, etc). Therefore the browser ui WebContents shouldn't be reported as the Browser type.

            WDYT of introducing a new kTypeBrowserUI type? The overriding of kTypeTab and kTypeBrowserUI to kPage in `RenderFrameDevToolsAgentHost::GetType()` will become reasonable, since both Tab and BrowserUI are web pages.

            Liang Zhao

            Does feel better to have a new type. Updated.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Dmitry Gozman
            • Keren Zhu
            • Mason Freed
            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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
              Gerrit-Change-Number: 6990317
              Gerrit-PatchSet: 11
              Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
              Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
              Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
              Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
              Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
              Gerrit-Attention: Mason Freed <mas...@chromium.org>
              Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
              Gerrit-Attention: Keren Zhu <kere...@chromium.org>
              Gerrit-Comment-Date: Thu, 02 Oct 2025 23:00:41 +0000
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Mason Freed (Gerrit)

              unread,
              Oct 2, 2025, 9:12:17 PM (11 days ago) Oct 2
              to Liang Zhao, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
              Attention needed from Dmitry Gozman, Keren Zhu and Liang Zhao

              Mason Freed voted and added 1 comment

              Votes added by Mason Freed

              Code-Review+1

              1 comment

              Patchset-level comments
              File-level comment, Patchset 11 (Latest):
              Mason Freed . resolved

              third_party/blink/web_tests/VirtualTestSuites still LGTM

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Dmitry Gozman
              • Keren Zhu
              • Liang Zhao
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not 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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                Gerrit-Change-Number: 6990317
                Gerrit-PatchSet: 11
                Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
                Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                Gerrit-Comment-Date: Fri, 03 Oct 2025 01:12:06 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Dmitry Gozman (Gerrit)

                unread,
                Oct 3, 2025, 4:04:13 AM (11 days ago) Oct 3
                to Liang Zhao, Andrey Kosyakov, Mason Freed, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                Attention needed from Andrey Kosyakov, Keren Zhu and Liang Zhao

                Dmitry Gozman added 1 comment

                Patchset-level comments
                Dmitry Gozman . resolved

                It seems to me that the most logical way to report CDP targets in this case is:

                • browser_ui target
                • tab target for each tab
                • basically, nothing changes compared to non-webui browser, except for an additional target being reported

                Overall, the treatment for browser_ui target should be very similar to tab targets. For example, exclude it by default in the target filter, do not report it to extensions, show it on chrome://inspect page, etc.

                I don't think we need a feature for this - we should figure out the behavior once and stick to it.

                Adding caseq@ who worked on tab targets for his input.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Andrey Kosyakov
                • Keren Zhu
                • Liang Zhao
                Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not 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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                Gerrit-Change-Number: 6990317
                Gerrit-PatchSet: 11
                Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                Gerrit-Comment-Date: Fri, 03 Oct 2025 08:03:57 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Andrey Kosyakov (Gerrit)

                unread,
                Oct 3, 2025, 1:24:33 PM (11 days ago) Oct 3
                to Liang Zhao, Alex N. Jose, Mason Freed, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                Attention needed from Alex N. Jose, Keren Zhu and Liang Zhao

                Andrey Kosyakov voted and added 1 comment

                Votes added by Andrey Kosyakov

                Code-Review-1

                1 comment

                Patchset-level comments
                Andrey Kosyakov . unresolved

                +1 to Dmitry says, I don't think this is a step in the right direction. I don't think working around undesired chromedriver logic by adding quirks to chrome is the right way to solve it. +ale...@chromium.org who may help us solve this in the chromedriver land. From what I can see, right now dom UI pages are consistently reported as a tab target and a page target, same as regular pages. I think this is correct behavior. If you're observing a different behavior, please describe the scenario in details.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Alex N. Jose
                • Keren Zhu
                • Liang Zhao
                Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement is not satisfiedCode-Owners
                  • requirement is blockingCode-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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                  Gerrit-Change-Number: 6990317
                  Gerrit-PatchSet: 11
                  Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                  Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                  Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                  Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                  Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                  Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                  Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                  Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                  Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                  Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                  Gerrit-Comment-Date: Fri, 03 Oct 2025 17:24:22 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  unsatisfied_requirement
                  blocking_requirement
                  open
                  diffy

                  Liang Zhao (Gerrit)

                  unread,
                  Oct 3, 2025, 1:49:33 PM (11 days ago) Oct 3
                  to Alex N. Jose, Andrey Kosyakov, Mason Freed, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                  Attention needed from Alex N. Jose, Andrey Kosyakov and Keren Zhu

                  Liang Zhao added 1 comment

                  Patchset-level comments
                  Andrey Kosyakov . unresolved

                  +1 to Dmitry says, I don't think this is a step in the right direction. I don't think working around undesired chromedriver logic by adding quirks to chrome is the right way to solve it. +ale...@chromium.org who may help us solve this in the chromedriver land. From what I can see, right now dom UI pages are consistently reported as a tab target and a page target, same as regular pages. I think this is correct behavior. If you're observing a different behavior, please describe the scenario in details.

                  Liang Zhao

                  Thanks for the advice.

                  I also thought about what the desired behavior should be, but felt that we might want different behavior for different audiences and therefore a feature parameter to toggle.

                  For normal web developers, we probably don't want to expose our internal browser_ui targets which is part of the chrome browser itself.

                  For chrome developers, we would want to provide the "physical" targets without any alteration.

                  Currently, chrome://inspect/#pages shows chrome://webui-browser/ as the top with sites in tabs listed as children. The top Page (chrome://webui-browser/) is what we considered browser UI and should not be interested by normal web developer. For normal browser, the tabs are listed as top level pages (with possible first level child frame targets).

                  For wpt test, as long as browser_ui frame are not reported as normal Page and browser_ui WebContents is not reported as normal Tab, wpt tests will work. It seems the suggestion is to hide browser_ui WebContents target and report its frame target as of browser_ui type. That would work for WPT.

                  So, it is actually more about how to handle browser_ui frame targets.

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Alex N. Jose
                  • Andrey Kosyakov
                  • Keren Zhu
                  Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                  Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                  Gerrit-Comment-Date: Fri, 03 Oct 2025 17:49:23 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
                  satisfied_requirement
                  unsatisfied_requirement
                  blocking_requirement
                  open
                  diffy

                  Liang Zhao (Gerrit)

                  unread,
                  Oct 3, 2025, 2:16:02 PM (11 days ago) Oct 3
                  to Alex N. Jose, Andrey Kosyakov, Mason Freed, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                  Attention needed from Alex N. Jose, Andrey Kosyakov and Keren Zhu

                  Liang Zhao added 1 comment

                  Patchset-level comments
                  Andrey Kosyakov . unresolved

                  +1 to Dmitry says, I don't think this is a step in the right direction. I don't think working around undesired chromedriver logic by adding quirks to chrome is the right way to solve it. +ale...@chromium.org who may help us solve this in the chromedriver land. From what I can see, right now dom UI pages are consistently reported as a tab target and a page target, same as regular pages. I think this is correct behavior. If you're observing a different behavior, please describe the scenario in details.

                  Liang Zhao

                  Thanks for the advice.

                  I also thought about what the desired behavior should be, but felt that we might want different behavior for different audiences and therefore a feature parameter to toggle.

                  For normal web developers, we probably don't want to expose our internal browser_ui targets which is part of the chrome browser itself.

                  For chrome developers, we would want to provide the "physical" targets without any alteration.

                  Currently, chrome://inspect/#pages shows chrome://webui-browser/ as the top with sites in tabs listed as children. The top Page (chrome://webui-browser/) is what we considered browser UI and should not be interested by normal web developer. For normal browser, the tabs are listed as top level pages (with possible first level child frame targets).

                  For wpt test, as long as browser_ui frame are not reported as normal Page and browser_ui WebContents is not reported as normal Tab, wpt tests will work. It seems the suggestion is to hide browser_ui WebContents target and report its frame target as of browser_ui type. That would work for WPT.

                  So, it is actually more about how to handle browser_ui frame targets.

                  Liang Zhao

                  I assume that dom UI page refers to Elements panel when inspecting the site in tab, the current DevTools UI is working as expected and this change would not change that behavior. That's the behavior of inspecting a specific WebContents, not related to target enumeration behavior.

                  Gerrit-Comment-Date: Fri, 03 Oct 2025 18:15:49 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
                  Comment-In-Reply-To: Liang Zhao <lz...@microsoft.com>
                  satisfied_requirement
                  unsatisfied_requirement
                  blocking_requirement
                  open
                  diffy

                  Andrey Kosyakov (Gerrit)

                  unread,
                  Oct 3, 2025, 2:28:39 PM (10 days ago) Oct 3
                  to Liang Zhao, Alex N. Jose, Mason Freed, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                  Attention needed from Alex N. Jose, Keren Zhu and Liang Zhao

                  Andrey Kosyakov voted and added 1 comment

                  Votes added by Andrey Kosyakov

                  Code-Review+0

                  1 comment

                  Patchset-level comments
                  Andrey Kosyakov . unresolved

                  +1 to Dmitry says, I don't think this is a step in the right direction. I don't think working around undesired chromedriver logic by adding quirks to chrome is the right way to solve it. +ale...@chromium.org who may help us solve this in the chromedriver land. From what I can see, right now dom UI pages are consistently reported as a tab target and a page target, same as regular pages. I think this is correct behavior. If you're observing a different behavior, please describe the scenario in details.

                  Liang Zhao

                  Thanks for the advice.

                  I also thought about what the desired behavior should be, but felt that we might want different behavior for different audiences and therefore a feature parameter to toggle.

                  For normal web developers, we probably don't want to expose our internal browser_ui targets which is part of the chrome browser itself.

                  For chrome developers, we would want to provide the "physical" targets without any alteration.

                  Currently, chrome://inspect/#pages shows chrome://webui-browser/ as the top with sites in tabs listed as children. The top Page (chrome://webui-browser/) is what we considered browser UI and should not be interested by normal web developer. For normal browser, the tabs are listed as top level pages (with possible first level child frame targets).

                  For wpt test, as long as browser_ui frame are not reported as normal Page and browser_ui WebContents is not reported as normal Tab, wpt tests will work. It seems the suggestion is to hide browser_ui WebContents target and report its frame target as of browser_ui type. That would work for WPT.

                  So, it is actually more about how to handle browser_ui frame targets.

                  Liang Zhao

                  I assume that dom UI page refers to Elements panel when inspecting the site in tab, the current DevTools UI is working as expected and this change would not change that behavior. That's the behavior of inspecting a specific WebContents, not related to target enumeration behavior.

                  Andrey Kosyakov

                  I think we already have precedent for exposing our guts (i.e. dom UI pages like settings), I don't think webium should be different. Even if we decide that it should, this should be then implemented just as hiding certain targets rather than changing their types.

                  I played with it a bit now and I can see the problem. So my suggestion is:

                  • keep the dedicated type for the briwser_ui;
                  • make sure regular pages are reported as `page` rather than a `webview`;
                  • do so unconditoinally (I doubt there's a merit of switching target types upon a feature flag, and it sounds very confusing).

                  Does this make sense?

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Alex N. Jose
                  • Keren Zhu
                  • Liang Zhao
                  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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                    Gerrit-Change-Number: 6990317
                    Gerrit-PatchSet: 11
                    Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                    Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                    Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                    Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                    Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                    Gerrit-Comment-Date: Fri, 03 Oct 2025 18:28:19 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: Yes
                    satisfied_requirement
                    unsatisfied_requirement
                    open
                    diffy

                    Liang Zhao (Gerrit)

                    unread,
                    Oct 3, 2025, 2:48:22 PM (10 days ago) Oct 3
                    to Alex N. Jose, Andrey Kosyakov, Mason Freed, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                    Attention needed from Alex N. Jose, Andrey Kosyakov and Keren Zhu

                    Liang Zhao added 1 comment

                    Patchset-level comments
                    Andrey Kosyakov . unresolved

                    +1 to Dmitry says, I don't think this is a step in the right direction. I don't think working around undesired chromedriver logic by adding quirks to chrome is the right way to solve it. +ale...@chromium.org who may help us solve this in the chromedriver land. From what I can see, right now dom UI pages are consistently reported as a tab target and a page target, same as regular pages. I think this is correct behavior. If you're observing a different behavior, please describe the scenario in details.

                    Liang Zhao

                    Thanks for the advice.

                    I also thought about what the desired behavior should be, but felt that we might want different behavior for different audiences and therefore a feature parameter to toggle.

                    For normal web developers, we probably don't want to expose our internal browser_ui targets which is part of the chrome browser itself.

                    For chrome developers, we would want to provide the "physical" targets without any alteration.

                    Currently, chrome://inspect/#pages shows chrome://webui-browser/ as the top with sites in tabs listed as children. The top Page (chrome://webui-browser/) is what we considered browser UI and should not be interested by normal web developer. For normal browser, the tabs are listed as top level pages (with possible first level child frame targets).

                    For wpt test, as long as browser_ui frame are not reported as normal Page and browser_ui WebContents is not reported as normal Tab, wpt tests will work. It seems the suggestion is to hide browser_ui WebContents target and report its frame target as of browser_ui type. That would work for WPT.

                    So, it is actually more about how to handle browser_ui frame targets.

                    Liang Zhao

                    I assume that dom UI page refers to Elements panel when inspecting the site in tab, the current DevTools UI is working as expected and this change would not change that behavior. That's the behavior of inspecting a specific WebContents, not related to target enumeration behavior.

                    Andrey Kosyakov

                    I think we already have precedent for exposing our guts (i.e. dom UI pages like settings), I don't think webium should be different. Even if we decide that it should, this should be then implemented just as hiding certain targets rather than changing their types.

                    I played with it a bit now and I can see the problem. So my suggestion is:

                    • keep the dedicated type for the briwser_ui;
                    • make sure regular pages are reported as `page` rather than a `webview`;
                    • do so unconditoinally (I doubt there's a merit of switching target types upon a feature flag, and it sounds very confusing).

                    Does this make sense?

                    Liang Zhao

                    That sounds good to me. Let me update the code and play around it to see whether I understand the suggestion correctly and whether there is any other issues with the design.

                    Specifically, I plan to hide browser ui WebContents target and expose its frame target as of browser_ui type. While there is a need to debug browser ui frame, we don't have a scenario that requires interacting with browser ui WebContents target. If we really want to expose browser ui WebContents, it would have to be of another new type so that we can differentiate it from browser ui frame target and normal tab WebContents target.

                    The end result is that chrome://inspect#page would show the same site list as normal browser, and the browser ui frame target (chrome://webui-browser/) will be shown in chrome://inspect/#other. We might have to make some change to make "Inspect" from chrome://inspect/#other for the new browser_ui works. It currently doesn't seem to work.

                    I will also remove the feature parameter.

                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • Alex N. Jose
                    • Andrey Kosyakov
                    • Keren Zhu
                    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                    Gerrit-Comment-Date: Fri, 03 Oct 2025 18:48:10 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: No
                    satisfied_requirement
                    unsatisfied_requirement
                    open
                    diffy

                    Liang Zhao (Gerrit)

                    unread,
                    Oct 3, 2025, 5:25:04 PM (10 days ago) Oct 3
                    to Alex N. Jose, Andrey Kosyakov, Mason Freed, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                    Attention needed from Alex N. Jose, Andrey Kosyakov, Keren Zhu and Mason Freed

                    Liang Zhao added 1 comment

                    Patchset-level comments
                    Andrey Kosyakov . unresolved

                    +1 to Dmitry says, I don't think this is a step in the right direction. I don't think working around undesired chromedriver logic by adding quirks to chrome is the right way to solve it. +ale...@chromium.org who may help us solve this in the chromedriver land. From what I can see, right now dom UI pages are consistently reported as a tab target and a page target, same as regular pages. I think this is correct behavior. If you're observing a different behavior, please describe the scenario in details.

                    Liang Zhao

                    Thanks for the advice.

                    I also thought about what the desired behavior should be, but felt that we might want different behavior for different audiences and therefore a feature parameter to toggle.

                    For normal web developers, we probably don't want to expose our internal browser_ui targets which is part of the chrome browser itself.

                    For chrome developers, we would want to provide the "physical" targets without any alteration.

                    Currently, chrome://inspect/#pages shows chrome://webui-browser/ as the top with sites in tabs listed as children. The top Page (chrome://webui-browser/) is what we considered browser UI and should not be interested by normal web developer. For normal browser, the tabs are listed as top level pages (with possible first level child frame targets).

                    For wpt test, as long as browser_ui frame are not reported as normal Page and browser_ui WebContents is not reported as normal Tab, wpt tests will work. It seems the suggestion is to hide browser_ui WebContents target and report its frame target as of browser_ui type. That would work for WPT.

                    So, it is actually more about how to handle browser_ui frame targets.

                    Liang Zhao

                    I assume that dom UI page refers to Elements panel when inspecting the site in tab, the current DevTools UI is working as expected and this change would not change that behavior. That's the behavior of inspecting a specific WebContents, not related to target enumeration behavior.

                    Andrey Kosyakov

                    I think we already have precedent for exposing our guts (i.e. dom UI pages like settings), I don't think webium should be different. Even if we decide that it should, this should be then implemented just as hiding certain targets rather than changing their types.

                    I played with it a bit now and I can see the problem. So my suggestion is:

                    • keep the dedicated type for the briwser_ui;
                    • make sure regular pages are reported as `page` rather than a `webview`;
                    • do so unconditoinally (I doubt there's a merit of switching target types upon a feature flag, and it sounds very confusing).

                    Does this make sense?

                    Liang Zhao

                    That sounds good to me. Let me update the code and play around it to see whether I understand the suggestion correctly and whether there is any other issues with the design.

                    Specifically, I plan to hide browser ui WebContents target and expose its frame target as of browser_ui type. While there is a need to debug browser ui frame, we don't have a scenario that requires interacting with browser ui WebContents target. If we really want to expose browser ui WebContents, it would have to be of another new type so that we can differentiate it from browser ui frame target and normal tab WebContents target.

                    The end result is that chrome://inspect#page would show the same site list as normal browser, and the browser ui frame target (chrome://webui-browser/) will be shown in chrome://inspect/#other. We might have to make some change to make "Inspect" from chrome://inspect/#other for the new browser_ui works. It currently doesn't seem to work.

                    I will also remove the feature parameter.

                    Liang Zhao

                    It seems that introducing a new type and treat it as inspectable as Page requires more changes. If I report browser_ui as the type for the frame, I am not able to inpsect it, the DevTools window will open, but the Element panel is empty and the page url is not shown in the DevTools window title.

                    Searching DevTools code, it seems that there is a concept of [IsPageTarget](https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js;drc=8fa26aeceaa8bd2e93e399640d38775275cab0dd;l=22652) and all possible target types are all declared in DevTools front end code.

                    Do we know how to update DevTools front end code to add a new browser_ui type that should be a Page target?

                    Besides that, I've updated the code to hide browser ui WebContents target and reports browser ui frame target as Page target. It seems that it works reasonable in chrome://inspect and wpt test. With the current code, in chrome://inspect, the browser ui is listed as another top level Page target along with other pages in tabs. Does the current code looks close to what it should be or even OK to go in?

                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • Alex N. Jose
                    • Andrey Kosyakov
                    • Keren Zhu
                    • Mason Freed
                    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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                      Gerrit-Change-Number: 6990317
                      Gerrit-PatchSet: 12
                      Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                      Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                      Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                      Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                      Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                      Gerrit-Attention: Mason Freed <mas...@chromium.org>
                      Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                      Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                      Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                      Gerrit-Comment-Date: Fri, 03 Oct 2025 21:24:52 +0000
                      satisfied_requirement
                      unsatisfied_requirement
                      open
                      diffy

                      Mason Freed (Gerrit)

                      unread,
                      Oct 3, 2025, 5:40:54 PM (10 days ago) Oct 3
                      to Liang Zhao, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                      Attention needed from Alex N. Jose, Andrey Kosyakov, Keren Zhu and Liang Zhao

                      Mason Freed voted and added 1 comment

                      Votes added by Mason Freed

                      Code-Review+1

                      1 comment

                      Patchset-level comments
                      Mason Freed . resolved

                      third_party/blink/web_tests/VirtualTestSuites still LGTM

                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Alex N. Jose
                      • Andrey Kosyakov
                      • Keren Zhu
                      • Liang Zhao
                      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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                        Gerrit-Change-Number: 6990317
                        Gerrit-PatchSet: 13
                        Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                        Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                        Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                        Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                        Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                        Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                        Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                        Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                        Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                        Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                        Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                        Gerrit-Comment-Date: Fri, 03 Oct 2025 21:40:43 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: Yes
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Keren Zhu (Gerrit)

                        unread,
                        Oct 4, 2025, 2:29:32 AM (10 days ago) Oct 4
                        to Liang Zhao, Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                        Attention needed from Alex N. Jose, Andrey Kosyakov and Liang Zhao

                        Keren Zhu added 2 comments

                        Patchset-level comments
                        Keren Zhu

                        The `IsPageTarget` code is in puppeteer, https://github.com/puppeteer/puppeteer/blame/a95d18496acb5a7cfe1d1752e7e0a17683e60fef/packages/puppeteer-core/src/cdp/Browser.ts#L185. I suspect that this is not the actual code that controls the DevTools behavior.

                        in chrome://inspect, the browser ui is listed as another top level Page target along with other pages in tabs

                        This looks good to me.

                        File content/browser/devtools/web_contents_devtools_agent_host.cc
                        Line 152, Patchset 15 (Latest): if (delegate && (delegate->GetTargetType(wc) == kTypeBrowserUI)) {
                        continue;
                        }
                        Keren Zhu . unresolved

                        what will happen if kTypeBrowserUI WebContents are included here?

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Alex N. Jose
                        • Andrey Kosyakov
                        • Liang Zhao
                        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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                        Gerrit-Change-Number: 6990317
                        Gerrit-PatchSet: 15
                        Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                        Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                        Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                        Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                        Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                        Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                        Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                        Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                        Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                        Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                        Gerrit-Comment-Date: Sat, 04 Oct 2025 06:29:27 +0000
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Liang Zhao (Gerrit)

                        unread,
                        Oct 6, 2025, 12:55:46 PM (8 days ago) Oct 6
                        to Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                        Attention needed from Alex N. Jose, Andrey Kosyakov and Keren Zhu

                        Liang Zhao added 2 comments

                        Patchset-level comments
                        Liang Zhao

                        If it feels right that the external behavior of reporting browser ui main frame as another Page, then the only issue is whether we internally report it Page or report as a new "browser_ui" type and update CDP and DevTools front end to handle this new type the same way as Page target.

                        File content/browser/devtools/web_contents_devtools_agent_host.cc
                        Line 152, Patchset 15 (Latest): if (delegate && (delegate->GetTargetType(wc) == kTypeBrowserUI)) {
                        continue;
                        }
                        Keren Zhu . resolved

                        what will happen if kTypeBrowserUI WebContents are included here?

                        Liang Zhao

                        Then the WebContents target will be reported as a Tab target and confuses chrome test driver and WPT test would not work. For WPT test, the test driver wants to close all "other" tabs and drive test tab to test page urls.

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Alex N. Jose
                        • Andrey Kosyakov
                        • Keren Zhu
                        Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                        Gerrit-Comment-Date: Mon, 06 Oct 2025 16:55:26 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Liang Zhao (Gerrit)

                        unread,
                        Oct 6, 2025, 3:08:14 PM (7 days ago) Oct 6
                        to Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                        Attention needed from Alex N. Jose, Andrey Kosyakov and Keren Zhu

                        Liang Zhao added 1 comment

                        Patchset-level comments
                        Liang Zhao

                        Looks like the DevTools front end change needed is in [attachedToTarget](https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/core/sdk/ChildTargetManager.ts;drc=a8b1f4dcc18f99034e11c79aa767347f03f512aa;l=179). If I add code to assign type with Type.FRAME for "browser_ui" there, inspecting the browser ui works.

                        @ca...@chromium.org, do you think that I should first modify DevTools front end code code to treat the new "browser_ui" as a Type.FRAME type, and then continue with this change and report the frame target as browser_ui, or get the current CL in and then add formal support for the new "browser_ui" type in separate CL?

                        Gerrit-Comment-Date: Mon, 06 Oct 2025 19:07:54 +0000
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Andrey Kosyakov (Gerrit)

                        unread,
                        Oct 6, 2025, 8:15:11 PM (7 days ago) Oct 6
                        to Liang Zhao, Mason Freed, Alex N. Jose, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                        Attention needed from Alex N. Jose, Keren Zhu and Liang Zhao

                        Andrey Kosyakov added 3 comments

                        Patchset-level comments
                        Andrey Kosyakov

                        As long as this is necessary to prevent a regression in the front-end, let's land that first. I was under impression that just adding another case label where we compute the capabilities would be sufficient, but it looks like we have some [additional magic](https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/core/sdk/ChildTargetManager.ts;l=156;drc=2de29efe573e2d6cf3831c516cb47772c57e135a;bpv=1;bpt=1) there, so please check with d...@chromium.org, I'm a bit out of date re that logic.

                        File chrome/browser/devtools/chrome_devtools_manager_delegate.cc
                        Line 276, Patchset 15 (Latest): if (should_handle_webui_browser &&
                        Andrey Kosyakov . unresolved

                        Do we actually need this check here? Perhaps `webui_browser::IsBrowserUIWebContents()` would be sufficient?

                        Line 286, Patchset 15 (Latest): return should_handle_webui_browser ? DevToolsAgentHost::kTypeTab
                        Andrey Kosyakov . unresolved

                        Hmm, that's a bit unexpected. From what I could see, the tab targets were correctly reported with WebUI browser, it's the page targets that were reported as views, isn't that so?
                        We shouldn't really return kTypeTab here, since this is only called from RenderFrameDevToolsAgentHost::GetTargetType(), whereas the real tab targets only correspond to WebContentsDevToolsAgnetHost (so kTypeTab is hard-coded there).

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Alex N. Jose
                        • Keren Zhu
                        • Liang Zhao
                        Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                        Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                        Gerrit-Comment-Date: Tue, 07 Oct 2025 00:14:59 +0000
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Keren Zhu (Gerrit)

                        unread,
                        Oct 7, 2025, 12:19:02 AM (7 days ago) Oct 7
                        to Liang Zhao, Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                        Attention needed from Alex N. Jose and Liang Zhao

                        Keren Zhu added 1 comment

                        File content/browser/devtools/web_contents_devtools_agent_host.cc
                        Line 152, Patchset 15 (Latest): if (delegate && (delegate->GetTargetType(wc) == kTypeBrowserUI)) {
                        continue;
                        }
                        Keren Zhu . unresolved

                        what will happen if kTypeBrowserUI WebContents are included here?

                        Liang Zhao

                        Then the WebContents target will be reported as a Tab target and confuses chrome test driver and WPT test would not work. For WPT test, the test driver wants to close all "other" tabs and drive test tab to test page urls.

                        Keren Zhu

                        Thanks for the explanation. This is a very important information. Can we add a comment? This can save people a lot of time.

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Alex N. Jose
                        • Liang Zhao
                        Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                        Gerrit-Comment-Date: Tue, 07 Oct 2025 04:18:49 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Liang Zhao (Gerrit)

                        unread,
                        Oct 7, 2025, 1:48:14 PM (7 days ago) Oct 7
                        to Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                        Attention needed from Alex N. Jose, Andrey Kosyakov and Keren Zhu

                        Liang Zhao added 4 comments

                        Patchset-level comments
                        Liang Zhao

                        Will get front end change in first. There are indeed 2 ways to get it to work, using url pattern or type. Since we have a new type, using type would be better in this case.

                        File chrome/browser/devtools/chrome_devtools_manager_delegate.cc
                        Line 276, Patchset 15 (Latest): if (should_handle_webui_browser &&
                        Andrey Kosyakov . unresolved

                        Do we actually need this check here? Perhaps `webui_browser::IsBrowserUIWebContents()` would be sufficient?

                        Liang Zhao

                        You are right, IsBrowserUIWebContents() should be sufficient. If we really want to check whether the feature is enabled before checking the WebContents, we can check the feature inside that function. Will change in next update.

                        Line 286, Patchset 15 (Latest): return should_handle_webui_browser ? DevToolsAgentHost::kTypeTab
                        Andrey Kosyakov . unresolved

                        Hmm, that's a bit unexpected. From what I could see, the tab targets were correctly reported with WebUI browser, it's the page targets that were reported as views, isn't that so?
                        We shouldn't really return kTypeTab here, since this is only called from RenderFrameDevToolsAgentHost::GetTargetType(), whereas the real tab targets only correspond to WebContentsDevToolsAgnetHost (so kTypeTab is hard-coded there).

                        Liang Zhao

                        This change is indeed something that is not clean. Returning kTypeTab is as a "logical" type that requires the caller to also make some adjustments. Without this change, the frame of the webui browser Tab is reported as kTypeGuest, parenting to the browser_ui WebContents.

                        This is actually not a surprise, as the webui browser really uses a guest WebContents for the tabs.

                        After thinking about it more, I think that we don't need this change. We can change the caller to check whether parent WebContents's target type is browser_ui to make the differentiation. If the parent WebContents is browser_ui, we will let the delegate to decide the type and if it is Page instead of WebView, we will set its parentId as empty.
                        Will make the change in the next update to the CL.

                        File content/browser/devtools/web_contents_devtools_agent_host.cc
                        Line 152, Patchset 15 (Latest): if (delegate && (delegate->GetTargetType(wc) == kTypeBrowserUI)) {
                        continue;
                        }
                        Keren Zhu . unresolved

                        what will happen if kTypeBrowserUI WebContents are included here?

                        Liang Zhao

                        Then the WebContents target will be reported as a Tab target and confuses chrome test driver and WPT test would not work. For WPT test, the test driver wants to close all "other" tabs and drive test tab to test page urls.

                        Keren Zhu

                        Thanks for the explanation. This is a very important information. Can we add a comment? This can save people a lot of time.

                        Liang Zhao

                        Will do in the next update of the change.

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Alex N. Jose
                        • Andrey Kosyakov
                        • Keren Zhu
                        Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                        Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                        Gerrit-Comment-Date: Tue, 07 Oct 2025 17:47:39 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Liang Zhao (Gerrit)

                        unread,
                        Oct 8, 2025, 5:28:00 PM (5 days ago) Oct 8
                        to Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                        Attention needed from Alex N. Jose, Andrey Kosyakov, Keren Zhu and Mason Freed

                        Liang Zhao added 4 comments

                        Patchset-level comments
                        File-level comment, Patchset 11:
                        Andrey Kosyakov . resolved
                        File chrome/browser/devtools/chrome_devtools_manager_delegate.cc
                        Line 276, Patchset 15: if (should_handle_webui_browser &&
                        Andrey Kosyakov . resolved

                        Do we actually need this check here? Perhaps `webui_browser::IsBrowserUIWebContents()` would be sufficient?

                        Liang Zhao

                        You are right, IsBrowserUIWebContents() should be sufficient. If we really want to check whether the feature is enabled before checking the WebContents, we can check the feature inside that function. Will change in next update.

                        Liang Zhao

                        Done

                        Line 286, Patchset 15: return should_handle_webui_browser ? DevToolsAgentHost::kTypeTab
                        Andrey Kosyakov . resolved

                        Hmm, that's a bit unexpected. From what I could see, the tab targets were correctly reported with WebUI browser, it's the page targets that were reported as views, isn't that so?
                        We shouldn't really return kTypeTab here, since this is only called from RenderFrameDevToolsAgentHost::GetTargetType(), whereas the real tab targets only correspond to WebContentsDevToolsAgnetHost (so kTypeTab is hard-coded there).

                        Liang Zhao

                        This change is indeed something that is not clean. Returning kTypeTab is as a "logical" type that requires the caller to also make some adjustments. Without this change, the frame of the webui browser Tab is reported as kTypeGuest, parenting to the browser_ui WebContents.

                        This is actually not a surprise, as the webui browser really uses a guest WebContents for the tabs.

                        After thinking about it more, I think that we don't need this change. We can change the caller to check whether parent WebContents's target type is browser_ui to make the differentiation. If the parent WebContents is browser_ui, we will let the delegate to decide the type and if it is Page instead of WebView, we will set its parentId as empty.
                        Will make the change in the next update to the CL.

                        Liang Zhao

                        Done

                        File content/browser/devtools/web_contents_devtools_agent_host.cc
                        Line 152, Patchset 15: if (delegate && (delegate->GetTargetType(wc) == kTypeBrowserUI)) {
                        continue;
                        }
                        Keren Zhu . resolved

                        what will happen if kTypeBrowserUI WebContents are included here?

                        Liang Zhao

                        Then the WebContents target will be reported as a Tab target and confuses chrome test driver and WPT test would not work. For WPT test, the test driver wants to close all "other" tabs and drive test tab to test page urls.

                        Keren Zhu

                        Thanks for the explanation. This is a very important information. Can we add a comment? This can save people a lot of time.

                        Liang Zhao

                        Will do in the next update of the change.

                        Liang Zhao

                        Done

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Alex N. Jose
                        • Andrey Kosyakov
                        • Keren Zhu
                        • Mason Freed
                        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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                          Gerrit-Change-Number: 6990317
                          Gerrit-PatchSet: 17
                          Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                          Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                          Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                          Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                          Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                          Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                          Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                          Gerrit-Attention: Mason Freed <mas...@chromium.org>
                          Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                          Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                          Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                          Gerrit-Comment-Date: Wed, 08 Oct 2025 21:27:36 +0000
                          satisfied_requirement
                          unsatisfied_requirement
                          open
                          diffy

                          Andrey Kosyakov (Gerrit)

                          unread,
                          Oct 8, 2025, 6:43:53 PM (5 days ago) Oct 8
                          to Liang Zhao, Mason Freed, Alex N. Jose, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                          Attention needed from Alex N. Jose, Keren Zhu, Liang Zhao and Mason Freed

                          Andrey Kosyakov added 5 comments

                          Patchset-level comments
                          File-level comment, Patchset 17 (Latest):
                          Andrey Kosyakov . resolved

                          mostly looks good, but let's try to deal with layering violations.

                          File chrome/browser/devtools/BUILD.gn
                          Line 250, Patchset 17 (Latest): "//chrome/browser/ui/webui_browser:feature_flag",
                          Andrey Kosyakov . unresolved

                          no longer needed?

                          File content/browser/devtools/render_frame_devtools_agent_host.cc
                          Line 777, Patchset 17 (Latest): (delegate->GetTargetType(contents) != kTypeBrowserUI)) {
                          Andrey Kosyakov . unresolved

                          nit: can this clause ever be false? can we instead CHECK() this?

                          Line 836, Patchset 17 (Latest): if (!type.empty() && (type != kTypeBrowserUI) &&
                          Andrey Kosyakov . unresolved

                          Let's try to have this logic in the delegate instead. `kTypeBrowserUI` does not belong to content/ layer because it's a notion that only exists in a certain embedder (chrome). Compare this to extension-specific types that are being [declared in the delegate as well](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/devtools/chrome_devtools_manager_delegate.cc;l=69;drc=7692ccdc59f703ce9e329a28e8edd8c7384327f8;bpv=1;bpt=1).

                          File content/browser/devtools/web_contents_devtools_agent_host.cc
                          Line 152, Patchset 17 (Latest): if (delegate && (delegate->GetTargetType(wc) == kTypeBrowserUI)) {
                          Andrey Kosyakov . unresolved

                          Similarly to a previous comment, this is a layering violation as well. Is there any other way we can differentiate this one? FWIW, since I wouldn't expect the browser UI to ever navigate, perhaps we can entirely skip creating a WebCotentsDevToolsAgentHost for it (which still leaves a problem of differentiating it from regular WCs in the content layer)?

                          Open in Gerrit

                          Related details

                          Attention is currently required from:
                          • Alex N. Jose
                          • Keren Zhu
                          • Liang Zhao
                          • Mason Freed
                          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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                            Gerrit-Change-Number: 6990317
                            Gerrit-PatchSet: 17
                            Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                            Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                            Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                            Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                            Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                            Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                            Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                            Gerrit-Attention: Mason Freed <mas...@chromium.org>
                            Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                            Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                            Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                            Gerrit-Comment-Date: Wed, 08 Oct 2025 22:43:27 +0000
                            Gerrit-HasComments: Yes
                            Gerrit-Has-Labels: No
                            satisfied_requirement
                            unsatisfied_requirement
                            open
                            diffy

                            Liang Zhao (Gerrit)

                            unread,
                            Oct 8, 2025, 7:29:23 PM (5 days ago) Oct 8
                            to Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                            Attention needed from Alex N. Jose, Andrey Kosyakov, Keren Zhu and Mason Freed

                            Liang Zhao added 3 comments

                            File chrome/browser/devtools/BUILD.gn
                            Line 250, Patchset 17 (Latest): "//chrome/browser/ui/webui_browser:feature_flag",
                            Andrey Kosyakov . unresolved

                            no longer needed?

                            Liang Zhao

                            It is still needed, it is named as feature_flag, but really is for webui_browser.h. Let me rename the build target as headers so that it is not confusing.

                            File content/browser/devtools/render_frame_devtools_agent_host.cc
                            Line 777, Patchset 17 (Latest): (delegate->GetTargetType(contents) != kTypeBrowserUI)) {
                            Andrey Kosyakov . resolved

                            nit: can this clause ever be false? can we instead CHECK() this?

                            Liang Zhao

                            We currently don't have other guest contents besides the ones for tabs in browser ui top frame, but it is possible for browser ui top frame to use guest contents for things other than tab and that guest contents should be considered as part of browser UI. In that case, we would want to report that guest view as a webview child to the browser UI main frame target.
                            I actually don't think that we should CHECK.

                            Line 836, Patchset 17 (Latest): if (!type.empty() && (type != kTypeBrowserUI) &&
                            Andrey Kosyakov . unresolved

                            Let's try to have this logic in the delegate instead. `kTypeBrowserUI` does not belong to content/ layer because it's a notion that only exists in a certain embedder (chrome). Compare this to extension-specific types that are being [declared in the delegate as well](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/devtools/chrome_devtools_manager_delegate.cc;l=69;drc=7692ccdc59f703ce9e329a28e8edd8c7384327f8;bpv=1;bpt=1).

                            Liang Zhao

                            I have been struggling how to make the layering work and really need advice.

                            Currently, the type for guest content is decided in content layer without further check with delegate, but for webui browser, we want delegate to override content layer's classification for the guest contents.

                            For it to work, we would have to move the whole logic to delegates and always let delegate to decide, or have a contract between content layer and delegate for delegate to indicate that it wants to override the content layer classification.

                            If we move the whole logic to delegates, we would also have to add duplicated code into DevToolsManagerDelegateAndroid to handle the guest contents. And we are introducing a breaking change for other embedders. They also have to update they delegates to have duplicated code to handle the guest content that content layer should be able to handle by default.

                            For indicating that delegate want to override type for guest content, I struggled with how to express that "delegate want to override" intent. Returning a "logical kTypeTab" from delegate and documenting it in previous versions of this CL was that attempt.

                            Though not that obvious, we have similar layering issue in GetParentId(),

                            If we document the implication of returning kTypeBrowserUI from delegate (treat non browser ui children as top level target with type from delegate), would that mitigate layering concern?

                            What do you think is the best approach?

                            Open in Gerrit

                            Related details

                            Attention is currently required from:
                            • Alex N. Jose
                            • Andrey Kosyakov
                            • Keren Zhu
                            • Mason Freed
                            Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                            Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                            Gerrit-Comment-Date: Wed, 08 Oct 2025 23:28:59 +0000
                            Gerrit-HasComments: Yes
                            Gerrit-Has-Labels: No
                            Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
                            satisfied_requirement
                            unsatisfied_requirement
                            open
                            diffy

                            Liang Zhao (Gerrit)

                            unread,
                            Oct 8, 2025, 7:53:31 PM (5 days ago) Oct 8
                            to Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                            Attention needed from Alex N. Jose, Andrey Kosyakov, Keren Zhu and Mason Freed

                            Liang Zhao added 1 comment

                            File content/browser/devtools/web_contents_devtools_agent_host.cc
                            Line 152, Patchset 17 (Latest): if (delegate && (delegate->GetTargetType(wc) == kTypeBrowserUI)) {
                            Andrey Kosyakov . unresolved

                            Similarly to a previous comment, this is a layering violation as well. Is there any other way we can differentiate this one? FWIW, since I wouldn't expect the browser UI to ever navigate, perhaps we can entirely skip creating a WebCotentsDevToolsAgentHost for it (which still leaves a problem of differentiating it from regular WCs in the content layer)?

                            Liang Zhao
                            I feel that we might need a new contract between content layer and delegate to solve the layering issue.
                            In previous versions of this CL, I tried:
                            - Adding a new method like GetLogicalTargetType() that can return kTypeBrowser and kTypeTab and documents the implications of returning them
                            - Allowing GetTargetType to return these "logical" types and document their implications

                            Both don't feel great.

                            Gerrit-Comment-Date: Wed, 08 Oct 2025 23:53:03 +0000
                            satisfied_requirement
                            unsatisfied_requirement
                            open
                            diffy

                            Liang Zhao (Gerrit)

                            unread,
                            Oct 8, 2025, 8:04:01 PM (5 days ago) Oct 8
                            to Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                            Attention needed from Alex N. Jose, Andrey Kosyakov, Keren Zhu and Mason Freed

                            Liang Zhao added 1 comment

                            File chrome/browser/devtools/BUILD.gn
                            Line 250, Patchset 17: "//chrome/browser/ui/webui_browser:feature_flag",
                            Andrey Kosyakov . resolved

                            no longer needed?

                            Liang Zhao

                            It is still needed, it is named as feature_flag, but really is for webui_browser.h. Let me rename the build target as headers so that it is not confusing.

                            Liang Zhao

                            updated build target name to headers

                            Open in Gerrit

                            Related details

                            Attention is currently required from:
                            • Alex N. Jose
                            • Andrey Kosyakov
                            • Keren Zhu
                            • Mason Freed
                            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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                            Gerrit-Change-Number: 6990317
                            Gerrit-PatchSet: 18
                            Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                            Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                            Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                            Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                            Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                            Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                            Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                            Gerrit-Attention: Mason Freed <mas...@chromium.org>
                            Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                            Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                            Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                            Gerrit-Comment-Date: Thu, 09 Oct 2025 00:03:36 +0000
                            Gerrit-HasComments: Yes
                            Gerrit-Has-Labels: No
                            Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
                            Comment-In-Reply-To: Liang Zhao <lz...@microsoft.com>
                            satisfied_requirement
                            unsatisfied_requirement
                            open
                            diffy

                            Liang Zhao (Gerrit)

                            unread,
                            Oct 9, 2025, 1:30:33 PM (5 days ago) Oct 9
                            to Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                            Attention needed from Alex N. Jose, Andrey Kosyakov, Keren Zhu and Mason Freed

                            Liang Zhao added 1 comment

                            File content/browser/devtools/web_contents_devtools_agent_host.cc
                            Line 152, Patchset 17: if (delegate && (delegate->GetTargetType(wc) == kTypeBrowserUI)) {
                            Andrey Kosyakov . unresolved

                            Similarly to a previous comment, this is a layering violation as well. Is there any other way we can differentiate this one? FWIW, since I wouldn't expect the browser UI to ever navigate, perhaps we can entirely skip creating a WebCotentsDevToolsAgentHost for it (which still leaves a problem of differentiating it from regular WCs in the content layer)?

                            Liang Zhao
                            I feel that we might need a new contract between content layer and delegate to solve the layering issue.
                            In previous versions of this CL, I tried:
                            - Adding a new method like GetLogicalTargetType() that can return kTypeBrowser and kTypeTab and documents the implications of returning them
                            - Allowing GetTargetType to return these "logical" types and document their implications

                            Both don't feel great.

                            Liang Zhao
                            @ca...@chromium.org, thought about this more, would add a new delegate method work better:
                            ```
                            // Returns classification override for the `web_contents` about whether it
                            // should be treated as a Tab target.
                            // Returns:
                            // - std::nullopt if the delegate doesn't want to override the default
                            // behavior, which means a kTypeTab target for WebContents and a frame
                            // target for its main frame will be reported when enumerating all
                            // targets.
                            // - true if the target should be treated as a Tab with no parent even if
                            // it is an inner WebContents that might be treated as kTypeGuest by
                            // default. A kTypeTab target for WebContents and a frame target with
                            // type determined by GetTargetType will be reported when enumerating all
                            // targets.
                            // - false if the target should not be treated as a Tab, which means no
                            // target is reported for the WebContents when enumerating all targets.
                            // Its main frame target will be reported as normal.
                            virtual std::optional<bool> ShouldReportAsTabTarget(WebContents* web_contents);
                            ```

                            We will return true for "tabs", false for browser ui, and std::nullopt otherwise.

                            For whether we want to prevent creating WebCotentsDevToolsAgentHost entirely, as DevToolsAgentHost::GetOrCreateForTab() is used as GetOrCreateForWebContents when open DevTools Window for a WebContents, if we return null from DevToolsAgentHost::GetOrCreateForTab(), things would be broken.

                            Gerrit-Comment-Date: Thu, 09 Oct 2025 17:30:09 +0000
                            satisfied_requirement
                            unsatisfied_requirement
                            open
                            diffy

                            Mason Freed (Gerrit)

                            unread,
                            Oct 9, 2025, 8:00:30 PM (4 days ago) Oct 9
                            to Liang Zhao, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                            Attention needed from Alex N. Jose, Andrey Kosyakov, Keren Zhu and Liang Zhao

                            Mason Freed voted and added 1 comment

                            Votes added by Mason Freed

                            Code-Review+1

                            1 comment

                            Patchset-level comments
                            Mason Freed . resolved

                            third_party/blink/web_tests/VirtualTestSuites still LGTM

                            Open in Gerrit

                            Related details

                            Attention is currently required from:
                            • Alex N. Jose
                            • Andrey Kosyakov
                            • Keren Zhu
                            • Liang Zhao
                            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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                              Gerrit-Change-Number: 6990317
                              Gerrit-PatchSet: 18
                              Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                              Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                              Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                              Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                              Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                              Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                              Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                              Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                              Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                              Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                              Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                              Gerrit-Comment-Date: Fri, 10 Oct 2025 00:00:01 +0000
                              Gerrit-HasComments: Yes
                              Gerrit-Has-Labels: Yes
                              satisfied_requirement
                              unsatisfied_requirement
                              open
                              diffy

                              Andrey Kosyakov (Gerrit)

                              unread,
                              Oct 10, 2025, 9:02:07 PM (3 days ago) Oct 10
                              to Liang Zhao, Mason Freed, Alex N. Jose, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                              Attention needed from Alex N. Jose, Keren Zhu and Liang Zhao

                              Andrey Kosyakov added 1 comment

                              File content/browser/devtools/web_contents_devtools_agent_host.cc
                              Andrey Kosyakov

                              Yep, this sounds pretty reasonable to me, let's proceed with this approach!

                              Open in Gerrit

                              Related details

                              Attention is currently required from:
                              • Alex N. Jose
                              • Keren Zhu
                              • Liang Zhao
                              Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                              Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                              Gerrit-Comment-Date: Sat, 11 Oct 2025 01:01:38 +0000
                              satisfied_requirement
                              unsatisfied_requirement
                              open
                              diffy

                              Liang Zhao (Gerrit)

                              unread,
                              Oct 13, 2025, 1:59:17 PM (12 hours ago) Oct 13
                              to Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                              Attention needed from Alex N. Jose, Andrey Kosyakov, Keren Zhu and Mason Freed

                              Liang Zhao added 2 comments

                              File content/browser/devtools/render_frame_devtools_agent_host.cc
                              Line 836, Patchset 17: if (!type.empty() && (type != kTypeBrowserUI) &&
                              Andrey Kosyakov . resolved

                              Let's try to have this logic in the delegate instead. `kTypeBrowserUI` does not belong to content/ layer because it's a notion that only exists in a certain embedder (chrome). Compare this to extension-specific types that are being [declared in the delegate as well](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/devtools/chrome_devtools_manager_delegate.cc;l=69;drc=7692ccdc59f703ce9e329a28e8edd8c7384327f8;bpv=1;bpt=1).

                              Liang Zhao

                              I have been struggling how to make the layering work and really need advice.

                              Currently, the type for guest content is decided in content layer without further check with delegate, but for webui browser, we want delegate to override content layer's classification for the guest contents.

                              For it to work, we would have to move the whole logic to delegates and always let delegate to decide, or have a contract between content layer and delegate for delegate to indicate that it wants to override the content layer classification.

                              If we move the whole logic to delegates, we would also have to add duplicated code into DevToolsManagerDelegateAndroid to handle the guest contents. And we are introducing a breaking change for other embedders. They also have to update they delegates to have duplicated code to handle the guest content that content layer should be able to handle by default.

                              For indicating that delegate want to override type for guest content, I struggled with how to express that "delegate want to override" intent. Returning a "logical kTypeTab" from delegate and documenting it in previous versions of this CL was that attempt.

                              Though not that obvious, we have similar layering issue in GetParentId(),

                              If we document the implication of returning kTypeBrowserUI from delegate (treat non browser ui children as top level target with type from delegate), would that mitigate layering concern?

                              What do you think is the best approach?

                              Liang Zhao

                              Updated the code with a ShouldReportAsTabTarget() delegate, which should have addressed the layering concern.

                              File content/browser/devtools/web_contents_devtools_agent_host.cc
                              Line 152, Patchset 17: if (delegate && (delegate->GetTargetType(wc) == kTypeBrowserUI)) {
                              Andrey Kosyakov . resolved
                              Liang Zhao

                              Updated the code with a ShouldReportAsTabTarget() delegate.

                              Open in Gerrit

                              Related details

                              Attention is currently required from:
                              • Alex N. Jose
                              • Andrey Kosyakov
                              • Keren Zhu
                              • Mason Freed
                                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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                                  Gerrit-Change-Number: 6990317
                                  Gerrit-PatchSet: 20
                                  Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                                  Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                                  Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                                  Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                                  Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                                  Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                                  Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                                  Gerrit-Attention: Mason Freed <mas...@chromium.org>
                                  Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                                  Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                                  Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                                  Gerrit-Comment-Date: Mon, 13 Oct 2025 17:58:53 +0000
                                  satisfied_requirement
                                  unsatisfied_requirement
                                  open
                                  diffy

                                  Liang Zhao (Gerrit)

                                  unread,
                                  Oct 13, 2025, 2:11:04 PM (12 hours ago) Oct 13
                                  to Alison Gale, Tom Lukaszewicz, Mason Freed, Alex N. Jose, Andrey Kosyakov, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                                  Attention needed from Alex N. Jose, Alison Gale, Andrey Kosyakov, Keren Zhu, Mason Freed and Tom Lukaszewicz

                                  Liang Zhao added 1 comment

                                  Patchset-level comments
                                  File-level comment, Patchset 20 (Latest):
                                  Liang Zhao . resolved

                                  @ag...@chromium.org, could you please review the change to chrome/browser/ui/toasts/BUILD.gn?

                                  @tl...@chromium.org, could you please review the changes to chrome/browser/ui/views/side_panel/BUILD.gn and WebUI browser code?

                                  Open in Gerrit

                                  Related details

                                  Attention is currently required from:
                                  • Alex N. Jose
                                  • Alison Gale
                                  • Andrey Kosyakov
                                  • Keren Zhu
                                  • Mason Freed
                                  • Tom Lukaszewicz
                                  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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                                  Gerrit-Change-Number: 6990317
                                  Gerrit-PatchSet: 20
                                  Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                                  Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                                  Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
                                  Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                                  Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                                  Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                                  Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                                  Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                                  Gerrit-Reviewer: Tom Lukaszewicz <tl...@chromium.org>
                                  Gerrit-Attention: Mason Freed <mas...@chromium.org>
                                  Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                                  Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
                                  Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                                  Gerrit-Attention: Alison Gale <ag...@chromium.org>
                                  Gerrit-Attention: Tom Lukaszewicz <tl...@chromium.org>
                                  Gerrit-Comment-Date: Mon, 13 Oct 2025 18:10:40 +0000
                                  Gerrit-HasComments: Yes
                                  Gerrit-Has-Labels: No
                                  satisfied_requirement
                                  unsatisfied_requirement
                                  open
                                  diffy

                                  Andrey Kosyakov (Gerrit)

                                  unread,
                                  Oct 13, 2025, 2:21:28 PM (12 hours ago) Oct 13
                                  to Liang Zhao, Alison Gale, Tom Lukaszewicz, Mason Freed, Alex N. Jose, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                                  Attention needed from Alex N. Jose, Alison Gale, Keren Zhu, Liang Zhao, Mason Freed and Tom Lukaszewicz

                                  Andrey Kosyakov voted and added 1 comment

                                  Votes added by Andrey Kosyakov

                                  Code-Review+1

                                  1 comment

                                  Patchset-level comments
                                  Andrey Kosyakov . resolved

                                  Thanks, lgtm! That new delegate method makes it pretty neat!

                                  Open in Gerrit

                                  Related details

                                  Attention is currently required from:
                                  • Alex N. Jose
                                  • Alison Gale
                                  • Keren Zhu
                                  • Liang Zhao
                                  • Mason Freed
                                  • Tom Lukaszewicz
                                  Submit Requirements:
                                    • requirement satisfiedCode-Coverage
                                    • requirement is not 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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                                    Gerrit-Change-Number: 6990317
                                    Gerrit-PatchSet: 20
                                    Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                                    Gerrit-Reviewer: Alex N. Jose <ale...@chromium.org>
                                    Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
                                    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                                    Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                                    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                                    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                                    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                                    Gerrit-Reviewer: Tom Lukaszewicz <tl...@chromium.org>
                                    Gerrit-Attention: Mason Freed <mas...@chromium.org>
                                    Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                                    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                                    Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                                    Gerrit-Attention: Alison Gale <ag...@chromium.org>
                                    Gerrit-Attention: Tom Lukaszewicz <tl...@chromium.org>
                                    Gerrit-Comment-Date: Mon, 13 Oct 2025 18:20:55 +0000
                                    Gerrit-HasComments: Yes
                                    Gerrit-Has-Labels: Yes
                                    satisfied_requirement
                                    unsatisfied_requirement
                                    open
                                    diffy

                                    Mason Freed (Gerrit)

                                    unread,
                                    Oct 13, 2025, 3:04:33 PM (11 hours ago) Oct 13
                                    to Liang Zhao, Andrey Kosyakov, Alison Gale, Tom Lukaszewicz, Alex N. Jose, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                                    Attention needed from Alex N. Jose, Alison Gale, Keren Zhu, Liang Zhao and Tom Lukaszewicz

                                    Mason Freed voted and added 1 comment

                                    Votes added by Mason Freed

                                    Code-Review+1

                                    1 comment

                                    Patchset-level comments
                                    Mason Freed . resolved

                                    third_party/blink/web_tests/VirtualTestSuites still LGTM

                                    Open in Gerrit

                                    Related details

                                    Attention is currently required from:
                                    • Alex N. Jose
                                    • Alison Gale
                                    • Keren Zhu
                                    • Liang Zhao
                                    • Tom Lukaszewicz
                                    Gerrit-Attention: Alex N. Jose <ale...@chromium.org>
                                    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                                    Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                                    Gerrit-Attention: Alison Gale <ag...@chromium.org>
                                    Gerrit-Attention: Tom Lukaszewicz <tl...@chromium.org>
                                    Gerrit-Comment-Date: Mon, 13 Oct 2025 19:04:03 +0000
                                    Gerrit-HasComments: Yes
                                    Gerrit-Has-Labels: Yes
                                    satisfied_requirement
                                    unsatisfied_requirement
                                    open
                                    diffy

                                    Liang Zhao (Gerrit)

                                    unread,
                                    Oct 13, 2025, 4:44:24 PM (10 hours ago) Oct 13
                                    to Alex N. Jose, Mason Freed, Andrey Kosyakov, Alison Gale, Tom Lukaszewicz, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                                    Attention needed from Alison Gale, Dmitry Gozman, Keren Zhu and Tom Lukaszewicz

                                    Liang Zhao added 1 comment

                                    Patchset-level comments
                                    Liang Zhao . resolved

                                    @dgo...@chromium.org, could you please take another look at the change, especially for the files under content/public/browser?

                                    Open in Gerrit

                                    Related details

                                    Attention is currently required from:
                                    • Alison Gale
                                    • Dmitry Gozman
                                    • Keren Zhu
                                    • Tom Lukaszewicz
                                    Submit Requirements:
                                    • requirement satisfiedCode-Coverage
                                    • requirement is not 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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                                    Gerrit-Change-Number: 6990317
                                    Gerrit-PatchSet: 20
                                    Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                                    Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
                                    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                                    Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                                    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                                    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                                    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                                    Gerrit-Reviewer: Tom Lukaszewicz <tl...@chromium.org>
                                    Gerrit-CC: Alex N. Jose <ale...@chromium.org>
                                    Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
                                    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                                    Gerrit-Attention: Alison Gale <ag...@chromium.org>
                                    Gerrit-Attention: Tom Lukaszewicz <tl...@chromium.org>
                                    Gerrit-Comment-Date: Mon, 13 Oct 2025 20:43:57 +0000
                                    Gerrit-HasComments: Yes
                                    Gerrit-Has-Labels: No
                                    satisfied_requirement
                                    unsatisfied_requirement
                                    open
                                    diffy

                                    Tom Lukaszewicz (Gerrit)

                                    unread,
                                    2:15 AM (5 minutes ago) 2:15 AM
                                    to Liang Zhao, Alex N. Jose, Mason Freed, Andrey Kosyakov, Alison Gale, Dmitry Gozman, Keren Zhu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, devtools...@chromium.org, blink-...@chromium.org
                                    Attention needed from Alison Gale, Dmitry Gozman, Keren Zhu and Liang Zhao

                                    Tom Lukaszewicz voted and added 5 comments

                                    Votes added by Tom Lukaszewicz

                                    Code-Review+1

                                    5 comments

                                    Patchset-level comments
                                    Tom Lukaszewicz . resolved

                                    lgtm! Just a few nits

                                    File chrome/browser/devtools/chrome_devtools_manager_delegate.cc
                                    Line 308, Patchset 20 (Latest): if (base::Contains(AllTabContentses(), web_contents)) {
                                    Tom Lukaszewicz . unresolved

                                    nit: Prefer `tabs::TabInterface::MaybeGetFromContents(web_contents)`

                                    File chrome/browser/ui/webui_browser/webui_browser.cc
                                    Line 18, Patchset 20 (Latest): return IsWebUIBrowserEnabled() &&
                                    (WebUIBrowserWindow::FromWebShellWebContents(web_contents) != nullptr);
                                    Tom Lukaszewicz . unresolved
                                    nit: This can just be
                                    ```
                                    return IsWebUIBrowserEnabled() &&
                                    WebUIBrowserWindow::FromWebShellWebContents(web_contents);
                                    ```
                                    File chrome/browser/ui/webui_browser/webui_browser_browsertest.cc
                                    Line 90, Patchset 20 (Latest):// For now this is disabled on CrOS since BrowserStatusMonitor/
                                    // AppServiceInstanceRegistryHelper aren't happy with our shutdown deletion
                                    // order of native windows vs. Browser and aren't tracking the switch over
                                    // of views on child guest contents properly.
                                    Tom Lukaszewicz . unresolved

                                    nit: Can we raise a bug for this and tag it as a TODO in this comment?

                                    File content/browser/devtools/render_frame_devtools_agent_host.cc
                                    Line 778, Patchset 20 (Latest): return "";
                                    Tom Lukaszewicz . unresolved

                                    trivial nit: We typically prefer `std::string()` instead of the `""` literal (here and elsewhere in this method I suppose)

                                    Open in Gerrit

                                    Related details

                                    Attention is currently required from:
                                    • Alison Gale
                                    • Dmitry Gozman
                                    • Keren Zhu
                                    • Liang Zhao
                                    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: Id872ffff679986d7a689f68b33a3e2f6163b85f4
                                      Gerrit-Change-Number: 6990317
                                      Gerrit-PatchSet: 20
                                      Gerrit-Owner: Liang Zhao <lz...@microsoft.com>
                                      Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
                                      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
                                      Gerrit-Reviewer: Dmitry Gozman <dgo...@chromium.org>
                                      Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                                      Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
                                      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
                                      Gerrit-Reviewer: Tom Lukaszewicz <tl...@chromium.org>
                                      Gerrit-CC: Alex N. Jose <ale...@chromium.org>
                                      Gerrit-Attention: Dmitry Gozman <dgo...@chromium.org>
                                      Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                                      Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
                                      Gerrit-Attention: Alison Gale <ag...@chromium.org>
                                      Gerrit-Comment-Date: Tue, 14 Oct 2025 06:12:54 +0000
                                      Gerrit-HasComments: Yes
                                      Gerrit-Has-Labels: Yes
                                      satisfied_requirement
                                      unsatisfied_requirement
                                      open
                                      diffy
                                      Reply all
                                      Reply to author
                                      Forward
                                      0 new messages