[GreenDevFloaty]: Add WebUI for showing DevTools frontend content. [chromium/src : main]

0 views
Skip to first unread message

Finnur Thorarinsson (Gerrit)

unread,
Feb 6, 2026, 5:47:22 AM (yesterday) Feb 6
to Alex Rudenko, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org
Attention needed from Alex Rudenko

Finnur Thorarinsson voted and added 1 comment

Votes added by Finnur Thorarinsson

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 17 (Latest):
Finnur Thorarinsson . resolved

Mind taking a look from a feature perspective?

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Rudenko
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: I6d80beebd1fcc92c629042659e02445a35d014e2
Gerrit-Change-Number: 7548493
Gerrit-PatchSet: 17
Gerrit-Owner: Finnur Thorarinsson <fin...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Finnur Thorarinsson <fin...@chromium.org>
Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
Gerrit-Comment-Date: Fri, 06 Feb 2026 10:47:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Rudenko (Gerrit)

unread,
Feb 6, 2026, 6:33:16 AM (yesterday) Feb 6
to Finnur Thorarinsson, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org
Attention needed from Finnur Thorarinsson

Alex Rudenko voted and added 1 comment

Votes added by Alex Rudenko

Code-Review+1

1 comment

Patchset-level comments
Alex Rudenko . resolved

LGTM (as a prototype, would need to revisit architecture if this is scheduled for launching)

Open in Gerrit

Related details

Attention is currently required from:
  • Finnur Thorarinsson
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: I6d80beebd1fcc92c629042659e02445a35d014e2
    Gerrit-Change-Number: 7548493
    Gerrit-PatchSet: 17
    Gerrit-Owner: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Attention: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 11:33:01 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alex Rudenko (Gerrit)

    unread,
    Feb 6, 2026, 6:36:20 AM (yesterday) Feb 6
    to Finnur Thorarinsson, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org
    Attention needed from Finnur Thorarinsson

    Alex Rudenko added 1 comment

    File chrome/browser/ui/webui/devtools/greendev_floaty_ui.cc
    Line 61, Patchset 17 (Latest): rfh->ExecuteJavaScript(
    Alex Rudenko . resolved

    we would not probably want to do it in production (probably we would need to give the floaty its own CDP connection and maybe a channel to communicate with the main devtools windows)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Finnur Thorarinsson
    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: I6d80beebd1fcc92c629042659e02445a35d014e2
    Gerrit-Change-Number: 7548493
    Gerrit-PatchSet: 17
    Gerrit-Owner: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Attention: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 11:36:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alex Rudenko (Gerrit)

    unread,
    Feb 6, 2026, 6:52:35 AM (yesterday) Feb 6
    to Finnur Thorarinsson, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org
    Attention needed from Finnur Thorarinsson

    Alex Rudenko voted and added 1 comment

    Votes added by Alex Rudenko

    Code-Review+1

    1 comment

    File chrome/browser/devtools/views/devtools_floaty.cc
    Line 86, Patchset 18 (Latest): GetFloatyRegistry()[backend_node_id_] = this;
    Alex Rudenko . resolved

    backend_node_id_ would duplicate between renderers so cannot be stored like this for production.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Finnur Thorarinsson
    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: I6d80beebd1fcc92c629042659e02445a35d014e2
    Gerrit-Change-Number: 7548493
    Gerrit-PatchSet: 18
    Gerrit-Owner: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Attention: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 11:52:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Finnur Thorarinsson (Gerrit)

    unread,
    Feb 6, 2026, 8:37:29 AM (yesterday) Feb 6
    to David Pennington, Andrey Kosyakov, Alex Rudenko, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org
    Attention needed from Andrey Kosyakov and David Pennington

    Finnur Thorarinsson added 3 comments

    Patchset-level comments
    File-level comment, Patchset 18 (Latest):
    Finnur Thorarinsson . resolved

    Andrey, can you give OWNERS approval for:
    c/b/ui/webui/devtools/

    David, can you give OWNERS approval for:
    c/b/r/render_view_context_menu.cc
    c/b/ui/webui/BUILD.gn

    Please note that this is purely to enable team testing of a prototype. This will not go as-is to production. See note in CL description.

    File chrome/browser/devtools/views/devtools_floaty.cc
    Line 86, Patchset 18 (Latest): GetFloatyRegistry()[backend_node_id_] = this;
    Alex Rudenko . resolved

    backend_node_id_ would duplicate between renderers so cannot be stored like this for production.

    Finnur Thorarinsson

    Yup, the intent with this is only internal team testing, but this will be addressed if we decide to put this into production. Thanks for the tip!

    File chrome/browser/renderer_context_menu/render_view_context_menu.cc
    Line 4317, Patchset 18 (Latest):void RenderViewContextMenu::ExecInspectElementWithGemini() {
    Finnur Thorarinsson . resolved

    Just a reminder that this function is guarded by a default-off flag, that we don't intend to turn on in production (ever). This is just for internal testing.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    • David Pennington
    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: I6d80beebd1fcc92c629042659e02445a35d014e2
    Gerrit-Change-Number: 7548493
    Gerrit-PatchSet: 18
    Gerrit-Owner: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: David Pennington <dpen...@chromium.org>
    Gerrit-Reviewer: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: David Pennington <dpen...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 13:37:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alex Rudenko <alexr...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Finnur Thorarinsson (Gerrit)

    unread,
    Feb 6, 2026, 9:45:49 AM (yesterday) Feb 6
    to David Pennington, Alex Rudenko, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org
    Attention needed from David Pennington

    Finnur Thorarinsson added 1 comment

    Patchset-level comments
    Finnur Thorarinsson . resolved

    Looks like I over-committed on the owners. Switching from Andrey to David, who owns a superset of the files I am requesting owners approval.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Pennington
    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: I6d80beebd1fcc92c629042659e02445a35d014e2
    Gerrit-Change-Number: 7548493
    Gerrit-PatchSet: 18
    Gerrit-Owner: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: David Pennington <dpen...@chromium.org>
    Gerrit-Reviewer: Finnur Thorarinsson <fin...@chromium.org>
    Gerrit-Attention: David Pennington <dpen...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 14:45:32 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Pennington (Gerrit)

    unread,
    Feb 6, 2026, 12:01:23 PM (yesterday) Feb 6
    to Finnur Thorarinsson, Alex Rudenko, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org
    Attention needed from Finnur Thorarinsson

    David Pennington added 14 comments

    File chrome/browser/devtools/views/devtools_floaty.h
    Line 24, Patchset 18 (Latest): DevToolsFloaty() = default;
    David Pennington . unresolved

    do we need a default constructor at all? can we just delete it since this is a bag of static methods?

    Line 21, Patchset 18 (Latest): static void Restore(int backend_node_id);
    David Pennington . unresolved

    what happens if 0 is passed in? lets add some comments.

    Line 18, Patchset 18 (Latest): int backend_node_id = 0);
    David Pennington . unresolved

    what does a node id of 0 do. can we use std::optional to be more specific?

    Line 17, Patchset 18 (Latest): int y,
    David Pennington . unresolved

    optional: use gfx::Point

    Line 12, Patchset 18 (Latest): // Creates and shows the floating window.
    David Pennington . unresolved

    please put what the params do in the comment for ths method.

    Line 10, Patchset 18 (Latest):class DevToolsFloaty {
    David Pennington . unresolved

    pelase provide comments for what this class is supposed to be. This seems to be a collection of static methods, so does it need to exist as is.

    Line 8, Patchset 18 (Latest):#include "chrome/browser/profiles/profile.h"
    David Pennington . unresolved

    you dont need to include profile it can be forward declared.

    File chrome/browser/devtools/views/devtools_floaty.cc
    Line 31, Patchset 18 (Latest):class DevToolsFloatyWebContentsDelegate : public content::WebContentsDelegate {
    David Pennington . unresolved

    add comments to these anonymous classes.

    Line 86, Patchset 18 (Latest): GetFloatyRegistry()[backend_node_id_] = this;
    Alex Rudenko . unresolved

    backend_node_id_ would duplicate between renderers so cannot be stored like this for production.

    Finnur Thorarinsson

    Yup, the intent with this is only internal team testing, but this will be addressed if we decide to put this into production. Thanks for the tip!

    David Pennington

    I dont see any code in this CL preventing Devtools floaty from being used in production, is there a plan to gate this code on a build flag or feature flag that is default disabled? if so lets add that in this CL with either a CHECK or preventing the static methods from running

    Line 279, Patchset 18 (Latest): inspected_contents->GetNativeView());
    David Pennington . unresolved

    i dont see this code anywhere else that special cases this for mac although i just did a quick search. is there any specific reason we need a mac implementation here?

    Line 289, Patchset 18 (Latest): const int offsetY = 175; // TODO(finnur): Remove.
    David Pennington . unresolved

    constexpr int

    also lets not add new TODOs into the codebase without bugs associated.

    Line 290, Patchset 18 (Latest): widget->SetBounds(gfx::Rect(x + offsetX, y + offsetY, 400, 300));
    David Pennington . unresolved

    values here to constexpr ints

    File chrome/browser/renderer_context_menu/render_view_context_menu.cc
    Line 4320, Patchset 18 (Latest): // TOOD(finnur): Send the actual node id.
    David Pennington . unresolved

    please add a bug.

    File chrome/browser/ui/webui/devtools/greendev_floaty_ui.cc
    Line 58, Patchset 18 (Latest): })())",
    David Pennington . unresolved

    should this be checked by the security team before we execute arbitrary js strings. I dont see this as a common implementation in our codebase.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Finnur Thorarinsson
    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: I6d80beebd1fcc92c629042659e02445a35d014e2
      Gerrit-Change-Number: 7548493
      Gerrit-PatchSet: 18
      Gerrit-Owner: Finnur Thorarinsson <fin...@chromium.org>
      Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
      Gerrit-Reviewer: David Pennington <dpen...@chromium.org>
      Gerrit-Reviewer: Finnur Thorarinsson <fin...@chromium.org>
      Gerrit-Attention: Finnur Thorarinsson <fin...@chromium.org>
      Gerrit-Comment-Date: Fri, 06 Feb 2026 17:01:08 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Finnur Thorarinsson <fin...@chromium.org>
      Comment-In-Reply-To: Alex Rudenko <alexr...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Finnur Thorarinsson (Gerrit)

      unread,
      8:29 AM (4 hours ago) 8:29 AM
      to David Pennington, Alex Rudenko, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org
      Attention needed from David Pennington

      Finnur Thorarinsson added 14 comments

      File chrome/browser/devtools/views/devtools_floaty.h
      Line 24, Patchset 18: DevToolsFloaty() = default;
      David Pennington . resolved

      do we need a default constructor at all? can we just delete it since this is a bag of static methods?

      Finnur Thorarinsson

      Nope. Gone.

      Line 21, Patchset 18: static void Restore(int backend_node_id);
      David Pennington . resolved

      what happens if 0 is passed in? lets add some comments.

      Finnur Thorarinsson

      Added CHECK.

      Line 18, Patchset 18: int backend_node_id = 0);
      David Pennington . resolved

      what does a node id of 0 do. can we use std::optional to be more specific?

      Finnur Thorarinsson

      This is not necessary. Removed, thanks!

      Line 17, Patchset 18: int y,
      David Pennington . resolved

      optional: use gfx::Point

      Finnur Thorarinsson

      Done

      Line 12, Patchset 18: // Creates and shows the floating window.
      David Pennington . resolved

      please put what the params do in the comment for ths method.

      Finnur Thorarinsson

      Done

      Line 10, Patchset 18:class DevToolsFloaty {
      David Pennington . resolved

      pelase provide comments for what this class is supposed to be. This seems to be a collection of static methods, so does it need to exist as is.

      Finnur Thorarinsson

      That is correct, it does not need to be a class, so I've converted it.

      Line 8, Patchset 18:#include "chrome/browser/profiles/profile.h"
      David Pennington . resolved

      you dont need to include profile it can be forward declared.

      Finnur Thorarinsson

      Done

      File chrome/browser/devtools/views/devtools_floaty.cc
      Line 31, Patchset 18:class DevToolsFloatyWebContentsDelegate : public content::WebContentsDelegate {
      David Pennington . resolved

      add comments to these anonymous classes.

      Finnur Thorarinsson

      Done

      Line 86, Patchset 18: GetFloatyRegistry()[backend_node_id_] = this;
      Alex Rudenko . resolved

      backend_node_id_ would duplicate between renderers so cannot be stored like this for production.

      Finnur Thorarinsson

      Yup, the intent with this is only internal team testing, but this will be addressed if we decide to put this into production. Thanks for the tip!

      David Pennington

      I dont see any code in this CL preventing Devtools floaty from being used in production, is there a plan to gate this code on a build flag or feature flag that is default disabled? if so lets add that in this CL with either a CHECK or preventing the static methods from running

      Finnur Thorarinsson

      I love this question, because it tells me you were looking to catch unintended consequences, which is great.

      The function itself is not gated on a feature flag, but the feature flag is in effect because the changes to the context menu only apply if the feature flag is enabled. Therefore, it is not possible to reach this code without the flag.
      https://chromium-review.googlesource.com/c/chromium/src/+/7548524/9/chrome/browser/renderer_context_menu/render_view_context_menu.cc#1647

      However, it is probably prudent to CHECK on the flag also, so I've added that.

      Line 279, Patchset 18: inspected_contents->GetNativeView());
      David Pennington . resolved

      i dont see this code anywhere else that special cases this for mac although i just did a quick search. is there any specific reason we need a mac implementation here?

      Finnur Thorarinsson

      This is due to a failure on the bots, because the Mac bots don't like nullptr being passed in. I had left my mac at home, so I could not investigate properly, so I special-cased this so I could continue with the CL (Mac isn't my primary dev setup). But, I've added a bug and a comment.

      Line 289, Patchset 18: const int offsetY = 175; // TODO(finnur): Remove.
      David Pennington . resolved

      constexpr int

      also lets not add new TODOs into the codebase without bugs associated.

      Finnur Thorarinsson

      Added TODOs.

      Line 290, Patchset 18: widget->SetBounds(gfx::Rect(x + offsetX, y + offsetY, 400, 300));
      David Pennington . resolved

      values here to constexpr ints

      Finnur Thorarinsson

      Done

      File chrome/browser/renderer_context_menu/render_view_context_menu.cc
      Line 4320, Patchset 18: // TOOD(finnur): Send the actual node id.
      David Pennington . resolved

      please add a bug.

      Finnur Thorarinsson

      Oops, did not mean to drop the bug reference. Thanks.

      File chrome/browser/ui/webui/devtools/greendev_floaty_ui.cc
      Line 58, Patchset 18: })())",
      David Pennington . resolved

      should this be checked by the security team before we execute arbitrary js strings. I dont see this as a common implementation in our codebase.

      Finnur Thorarinsson

      All of this code should be considered throw-away and will not be used for production. We're creating a series of prototypes that we are checking in behind a flag that we'll never turn on (except devs locally). This allows the wider team to play with the prototype concepts, collaborate and provide feedback -- with the ultimate goal of determining what is worth exploring further or launching into production. When a prototype is deemed worthy of production, we start by ripping it out of the codebase and then proceed with a formal project to launch the feature via the normal (formal) launch process (including Security).

      You can look at the go/ link in the CL description for more details on the prototypes and the working procedure.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • David Pennington
      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: I6d80beebd1fcc92c629042659e02445a35d014e2
        Gerrit-Change-Number: 7548493
        Gerrit-PatchSet: 19
        Gerrit-Owner: Finnur Thorarinsson <fin...@chromium.org>
        Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
        Gerrit-Reviewer: David Pennington <dpen...@chromium.org>
        Gerrit-Reviewer: Finnur Thorarinsson <fin...@chromium.org>
        Gerrit-Attention: David Pennington <dpen...@chromium.org>
        Gerrit-Comment-Date: Sat, 07 Feb 2026 13:29:35 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: David Pennington <dpen...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages