[Extensions] Implement OnToolbarActionUpdated() in menu model [chromium/src : main]

2 views
Skip to first unread message

Emilia Paz (Gerrit)

unread,
Oct 30, 2025, 5:38:13 PM (19 hours ago) Oct 30
to Shuhei Takahashi, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Shuhei Takahashi

Emilia Paz added 1 comment

File chrome/browser/ui/views/extensions/extensions_menu_view_platform_delegate_views.cc
Line 321, Patchset 3 (Latest): UpdatePage(GetActiveWebContents());
Emilia Paz . unresolved

I think it would be better to pass web contents from the [model](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/extensions/extensions_menu_view_model.cc;l=367-369;drc=0a4bbd7daba492283f6b453c0b0a7d934f2b2ecd?q=extensions_menu_view_model&ss=chromium) to the platform delegates here and in every method that computes it. That way we don't retrieve it from the Browser's tab strip anymore.
Thoughts? Can do in separate CL

Open in Gerrit

Related details

Attention is currently required from:
  • Shuhei Takahashi
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I9e7b08b5dad61f0894bd276bc2fd703b1dadefbf
Gerrit-Change-Number: 7088618
Gerrit-PatchSet: 3
Gerrit-Owner: Emilia Paz <emil...@chromium.org>
Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
Gerrit-Attention: Shuhei Takahashi <n...@chromium.org>
Gerrit-Comment-Date: Thu, 30 Oct 2025 21:38:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Shuhei Takahashi (Gerrit)

unread,
Oct 30, 2025, 8:22:45 PM (17 hours ago) Oct 30
to Emilia Paz, Shuhei Takahashi, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Emilia Paz

Shuhei Takahashi voted and added 2 comments

Votes added by Shuhei Takahashi

Code-Review+1

2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Shuhei Takahashi . resolved

Thanks Emilia!

File chrome/browser/ui/views/extensions/extensions_menu_view_platform_delegate_views.cc
Line 321, Patchset 3 (Latest): UpdatePage(GetActiveWebContents());
Emilia Paz . unresolved

I think it would be better to pass web contents from the [model](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/extensions/extensions_menu_view_model.cc;l=367-369;drc=0a4bbd7daba492283f6b453c0b0a7d934f2b2ecd?q=extensions_menu_view_model&ss=chromium) to the platform delegates here and in every method that computes it. That way we don't retrieve it from the Browser's tab strip anymore.
Thoughts? Can do in separate CL

Shuhei Takahashi

Hmm, it's not obvious to me which it better. This class already takes BWI in its constructor so it's capable of getting the active WebContents. If we introduce WebContents arguments to these methods, I would like to drop `GetActiveWebContents()` entirely to consolidate the way to get a WebContents so that the class consistently gets it from external classes, rather than via BWI.

Open in Gerrit

Related details

Attention is currently required from:
  • Emilia Paz
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I9e7b08b5dad61f0894bd276bc2fd703b1dadefbf
    Gerrit-Change-Number: 7088618
    Gerrit-PatchSet: 3
    Gerrit-Owner: Emilia Paz <emil...@chromium.org>
    Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
    Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
    Gerrit-Attention: Emilia Paz <emil...@chromium.org>
    Gerrit-Comment-Date: Fri, 31 Oct 2025 00:22:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Emilia Paz <emil...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages