extensions: Remove context menu callbacks from EAVC [chromium/src : main]

0 views
Skip to first unread message

Shuhei Takahashi (Gerrit)

unread,
Oct 17, 2025, 7:42:28 AM (12 days ago) Oct 17
to Shuhei Takahashi, Emilia Paz, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Emilia Paz

Shuhei Takahashi voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Emilia Paz
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: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
Gerrit-Change-Number: 7052664
Gerrit-PatchSet: 1
Gerrit-Owner: Shuhei Takahashi <n...@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, 17 Oct 2025 11:41:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Shuhei Takahashi (Gerrit)

unread,
Oct 17, 2025, 9:40:27 AM (12 days ago) Oct 17
to Shuhei Takahashi, Keren Zhu, Chromium LUCI CQ, Emilia Paz, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Emilia Paz and Keren Zhu

Shuhei Takahashi added 1 comment

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

kerenzhu@: PTAL for chrome/browser/ui/webui_browser. Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Emilia Paz
  • Keren Zhu
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: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
Gerrit-Change-Number: 7052664
Gerrit-PatchSet: 2
Gerrit-Owner: Shuhei Takahashi <n...@chromium.org>
Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
Gerrit-Attention: Keren Zhu <kere...@chromium.org>
Gerrit-Attention: Emilia Paz <emil...@chromium.org>
Gerrit-Comment-Date: Fri, 17 Oct 2025 13:39:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Keren Zhu (Gerrit)

unread,
Oct 17, 2025, 2:49:01 PM (12 days ago) Oct 17
to Shuhei Takahashi, Chromium LUCI CQ, Emilia Paz, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Emilia Paz

Keren Zhu voted and added 1 comment

Votes added by Keren Zhu

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Keren Zhu . resolved

cbui/webui_browser lgtm

Open in Gerrit

Related details

Attention is currently required from:
  • Emilia Paz
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: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
    Gerrit-Change-Number: 7052664
    Gerrit-PatchSet: 3
    Gerrit-Owner: Shuhei Takahashi <n...@chromium.org>
    Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
    Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
    Gerrit-Attention: Emilia Paz <emil...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 Oct 2025 18:48:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Shuhei Takahashi (Gerrit)

    unread,
    Oct 20, 2025, 8:39:47 PM (9 days ago) Oct 20
    to Shuhei Takahashi, Keren Zhu, Chromium LUCI CQ, Emilia Paz, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Emilia Paz and Keren Zhu

    Shuhei Takahashi added 1 comment

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

    Thanks Keren! But I need your approval again after rebasing... thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Emilia Paz
    • Keren Zhu
    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: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
      Gerrit-Change-Number: 7052664
      Gerrit-PatchSet: 6
      Gerrit-Owner: Shuhei Takahashi <n...@chromium.org>
      Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
      Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
      Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
      Gerrit-Attention: Keren Zhu <kere...@chromium.org>
      Gerrit-Attention: Emilia Paz <emil...@chromium.org>
      Gerrit-Comment-Date: Tue, 21 Oct 2025 00:39:13 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Emilia Paz (Gerrit)

      unread,
      Oct 21, 2025, 7:04:28 PM (8 days ago) Oct 21
      to Shuhei Takahashi, Keren Zhu, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
      Attention needed from Keren Zhu and Shuhei Takahashi

      Emilia Paz added 3 comments

      Patchset-level comments
      File-level comment, Patchset 7 (Latest):
      Emilia Paz . unresolved

      Idea: what about having the observer on ExtensionToolbarContainer? That way we avoid going: extension context menu controller -> toolbar action view | extension menu item view -> extensions toolbar container. Then, the container can handle it if the source is toolbar action view.
      We could also have the observer in `ExtensionsToolbarContainerViewController`, which my idea was to make it platform-agnostic and move the platform dependent to `ExtensionToolbarContainer` or introduce a `ExtensionsToolbarContainerPlatformDelegateViews`

      File chrome/browser/ui/views/extensions/extension_context_menu_controller.h
      Line 36, Patchset 7 (Latest): explicit ExtensionContextMenuController(
      Emilia Paz . unresolved

      nit: can drop `explicit`

      File chrome/browser/ui/views/extensions/extensions_menu_item_view.cc
      Line 589, Patchset 7 (Latest):
      void ExtensionMenuItemView::OnContextMenuShown() {}
      Emilia Paz . unresolved

      nit: Lets add a comment that there are no side effects to the menu item when the context menu is shown (that way empty methods looks intentional vs incomplete)
      -- although also see proposal in other comment

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Keren Zhu
      • Shuhei Takahashi
      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: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
        Gerrit-Change-Number: 7052664
        Gerrit-PatchSet: 7
        Gerrit-Owner: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
        Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
        Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Attention: Keren Zhu <kere...@chromium.org>
        Gerrit-Attention: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Comment-Date: Tue, 21 Oct 2025 23:04:18 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Shuhei Takahashi (Gerrit)

        unread,
        Oct 22, 2025, 9:27:41 AM (7 days ago) Oct 22
        to Shuhei Takahashi, Keren Zhu, Chromium LUCI CQ, Emilia Paz, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
        Attention needed from Emilia Paz and Keren Zhu

        Shuhei Takahashi added 1 comment

        Patchset-level comments
        Emilia Paz . unresolved

        Idea: what about having the observer on ExtensionToolbarContainer? That way we avoid going: extension context menu controller -> toolbar action view | extension menu item view -> extensions toolbar container. Then, the container can handle it if the source is toolbar action view.
        We could also have the observer in `ExtensionsToolbarContainerViewController`, which my idea was to make it platform-agnostic and move the platform dependent to `ExtensionToolbarContainer` or introduce a `ExtensionsToolbarContainerPlatformDelegateViews`

        Shuhei Takahashi

        Thanks for your suggestion! Let me check if I understand it correctly. The change is going to be like:

        • Add the `ContextMenuSource` argument to `ExtensionContextMenuController::Observer::OnContextMenu{Shown,Closed}()`
        • Make `ExtensionToolbarContainer` directly implement `ExtensionContextMenuController::Observer`. It will handle the event only when the source is the toolbar.
        • Drop the `ExtensionContextMenuController::Observer` implementation from `ToolbarActionView` and `ExtensionMenuItemView`.
        • Add the `ExtensionContextMenuController::Observer*` argument to the constructor of `ToolbarActionView` and `ExtensionMenuItemView`.
        • Let `ToolbarActionView` and `ExtensionMenuItemView` register the given observer as the observer of `ExtensionContextMenuController`.

        Am I right?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Emilia Paz
        • Keren Zhu
        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: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
        Gerrit-Change-Number: 7052664
        Gerrit-PatchSet: 7
        Gerrit-Owner: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
        Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
        Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Attention: Keren Zhu <kere...@chromium.org>
        Gerrit-Attention: Emilia Paz <emil...@chromium.org>
        Gerrit-Comment-Date: Wed, 22 Oct 2025 13:27:06 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Emilia Paz <emil...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Emilia Paz (Gerrit)

        unread,
        Oct 22, 2025, 6:22:31 PM (7 days ago) Oct 22
        to Shuhei Takahashi, Keren Zhu, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
        Attention needed from Keren Zhu and Shuhei Takahashi

        Emilia Paz voted and added 1 comment

        Votes added by Emilia Paz

        Code-Review+1

        1 comment

        Patchset-level comments
        Emilia Paz . unresolved

        Idea: what about having the observer on ExtensionToolbarContainer? That way we avoid going: extension context menu controller -> toolbar action view | extension menu item view -> extensions toolbar container. Then, the container can handle it if the source is toolbar action view.
        We could also have the observer in `ExtensionsToolbarContainerViewController`, which my idea was to make it platform-agnostic and move the platform dependent to `ExtensionToolbarContainer` or introduce a `ExtensionsToolbarContainerPlatformDelegateViews`

        Shuhei Takahashi

        Thanks for your suggestion! Let me check if I understand it correctly. The change is going to be like:

        • Add the `ContextMenuSource` argument to `ExtensionContextMenuController::Observer::OnContextMenu{Shown,Closed}()`
        • Make `ExtensionToolbarContainer` directly implement `ExtensionContextMenuController::Observer`. It will handle the event only when the source is the toolbar.
        • Drop the `ExtensionContextMenuController::Observer` implementation from `ToolbarActionView` and `ExtensionMenuItemView`.
        • Add the `ExtensionContextMenuController::Observer*` argument to the constructor of `ToolbarActionView` and `ExtensionMenuItemView`.
        • Let `ToolbarActionView` and `ExtensionMenuItemView` register the given observer as the observer of `ExtensionContextMenuController`.

        Am I right?

        Emilia Paz

        (1), (2) and (3) correct
        For registering the observer, I was thinking of using `ScopedObservation` in `ExtensionsToolbarContainer` and register it directly... but that means the extensions toolbar container needs a reference to extensions context menu controller and that wouldn't work because we have two controllers (toolbar action view and menu item view). Just realized that.

        So for my original proposal, you are right. We would need to pass `ExtensionContextMenuController::Observer*` to the constructor of `ToolbarActionView and ExtensionMenuItemView`.. and that would be tricky because we would need to pass `extensions_toolbar_container` to the views.

        I was trying to avoid adding more stuff to `ToolbarActionView::Delegate`.. but seems to be the best path. Sorry for the back and forwards, it's a bit hard to see all the connections with all the tangled code :')

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Keren Zhu
        • Shuhei Takahashi
        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: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
        Gerrit-Change-Number: 7052664
        Gerrit-PatchSet: 7
        Gerrit-Owner: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
        Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
        Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Attention: Keren Zhu <kere...@chromium.org>
        Gerrit-Attention: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Comment-Date: Wed, 22 Oct 2025 22:22:21 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Shuhei Takahashi <n...@chromium.org>
        Comment-In-Reply-To: Emilia Paz <emil...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Keren Zhu (Gerrit)

        unread,
        Oct 22, 2025, 6:52:11 PM (7 days ago) Oct 22
        to Shuhei Takahashi, Emilia Paz, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
        Attention needed from Shuhei Takahashi

        Keren Zhu voted and added 1 comment

        Votes added by Keren Zhu

        Code-Review+1

        1 comment

        Patchset-level comments
        Keren Zhu . resolved

        cb/webui_browser still lgtm.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Shuhei Takahashi
        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: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
        Gerrit-Change-Number: 7052664
        Gerrit-PatchSet: 7
        Gerrit-Owner: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
        Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
        Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Attention: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Comment-Date: Wed, 22 Oct 2025 22:52:04 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Shuhei Takahashi (Gerrit)

        unread,
        Oct 22, 2025, 7:42:07 PM (7 days ago) Oct 22
        to Shuhei Takahashi, Keren Zhu, Emilia Paz, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
        Attention needed from Shuhei Takahashi

        Shuhei Takahashi added 2 comments

        Patchset-level comments
        Emilia Paz . resolved

        Idea: what about having the observer on ExtensionToolbarContainer? That way we avoid going: extension context menu controller -> toolbar action view | extension menu item view -> extensions toolbar container. Then, the container can handle it if the source is toolbar action view.
        We could also have the observer in `ExtensionsToolbarContainerViewController`, which my idea was to make it platform-agnostic and move the platform dependent to `ExtensionToolbarContainer` or introduce a `ExtensionsToolbarContainerPlatformDelegateViews`

        Shuhei Takahashi

        Thanks for your suggestion! Let me check if I understand it correctly. The change is going to be like:

        • Add the `ContextMenuSource` argument to `ExtensionContextMenuController::Observer::OnContextMenu{Shown,Closed}()`
        • Make `ExtensionToolbarContainer` directly implement `ExtensionContextMenuController::Observer`. It will handle the event only when the source is the toolbar.
        • Drop the `ExtensionContextMenuController::Observer` implementation from `ToolbarActionView` and `ExtensionMenuItemView`.
        • Add the `ExtensionContextMenuController::Observer*` argument to the constructor of `ToolbarActionView` and `ExtensionMenuItemView`.
        • Let `ToolbarActionView` and `ExtensionMenuItemView` register the given observer as the observer of `ExtensionContextMenuController`.

        Am I right?

        Emilia Paz

        (1), (2) and (3) correct
        For registering the observer, I was thinking of using `ScopedObservation` in `ExtensionsToolbarContainer` and register it directly... but that means the extensions toolbar container needs a reference to extensions context menu controller and that wouldn't work because we have two controllers (toolbar action view and menu item view). Just realized that.

        So for my original proposal, you are right. We would need to pass `ExtensionContextMenuController::Observer*` to the constructor of `ToolbarActionView and ExtensionMenuItemView`.. and that would be tricky because we would need to pass `extensions_toolbar_container` to the views.

        I was trying to avoid adding more stuff to `ToolbarActionView::Delegate`.. but seems to be the best path. Sorry for the back and forwards, it's a bit hard to see all the connections with all the tangled code :')

        Shuhei Takahashi

        No worries, thanks for putting a thought on this!

        Shuhei Takahashi . resolved

        Thanks for reviews!

        Gerrit-Comment-Date: Wed, 22 Oct 2025 23:41:39 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Shuhei Takahashi (Gerrit)

        unread,
        Oct 27, 2025, 4:06:10 AM (2 days ago) Oct 27
        to Shuhei Takahashi, Keren Zhu, Emilia Paz, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
        Attention needed from Emilia Paz and Keren Zhu

        Shuhei Takahashi voted and added 1 comment

        Votes added by Shuhei Takahashi

        Commit-Queue+1

        1 comment

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

        Removed on top of crrev.com/c/7064871 and I need your approval again. Thanks!

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Emilia Paz
        • Keren Zhu
        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: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
        Gerrit-Change-Number: 7052664
        Gerrit-PatchSet: 9
        Gerrit-Owner: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
        Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
        Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
        Gerrit-Attention: Keren Zhu <kere...@chromium.org>
        Gerrit-Attention: Emilia Paz <emil...@chromium.org>
        Gerrit-Comment-Date: Mon, 27 Oct 2025 08:05:48 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Shuhei Takahashi (Gerrit)

        unread,
        Oct 27, 2025, 4:06:49 AM (2 days ago) Oct 27
        to Shuhei Takahashi, Keren Zhu, Emilia Paz, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
        Attention needed from Emilia Paz and Keren Zhu

        Shuhei Takahashi voted Commit-Queue+0

        Commit-Queue+0
        Gerrit-Comment-Date: Mon, 27 Oct 2025 08:06:28 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Shuhei Takahashi (Gerrit)

        unread,
        Oct 27, 2025, 4:11:49 AM (2 days ago) Oct 27
        to Shuhei Takahashi, Keren Zhu, Emilia Paz, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
        Attention needed from Emilia Paz and Keren Zhu

        Shuhei Takahashi voted and added 2 comments

        Votes added by Shuhei Takahashi

        Commit-Queue+1

        2 comments

        File chrome/browser/ui/views/extensions/extension_context_menu_controller.h
        Line 36, Patchset 7: explicit ExtensionContextMenuController(
        Emilia Paz . resolved

        nit: can drop `explicit`

        Shuhei Takahashi

        Done

        File chrome/browser/ui/views/extensions/extensions_menu_item_view.cc
        Line 589, Patchset 7:
        void ExtensionMenuItemView::OnContextMenuShown() {}
        Emilia Paz . resolved

        nit: Lets add a comment that there are no side effects to the menu item when the context menu is shown (that way empty methods looks intentional vs incomplete)
        -- although also see proposal in other comment

        Shuhei Takahashi

        Oops, overlooked this comment earlier. Added comments.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Emilia Paz
        • Keren Zhu
        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: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
          Gerrit-Change-Number: 7052664
          Gerrit-PatchSet: 10
          Gerrit-Owner: Shuhei Takahashi <n...@chromium.org>
          Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
          Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
          Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
          Gerrit-Attention: Keren Zhu <kere...@chromium.org>
          Gerrit-Attention: Emilia Paz <emil...@chromium.org>
          Gerrit-Comment-Date: Mon, 27 Oct 2025 08:11:17 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Emilia Paz <emil...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Shuhei Takahashi (Gerrit)

          unread,
          Oct 27, 2025, 4:13:18 AM (2 days ago) Oct 27
          to Shuhei Takahashi, Keren Zhu, Emilia Paz, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
          Attention needed from Emilia Paz and Keren Zhu

          Shuhei Takahashi added 1 comment

          Patchset-level comments
          Shuhei Takahashi . resolved

          Removed on top of crrev.com/c/7064871 and I need your approval again. Thanks!

          Shuhei Takahashi

          I meant, rebased.

          Gerrit-Comment-Date: Mon, 27 Oct 2025 08:12:57 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Emilia Paz (Gerrit)

          unread,
          Oct 27, 2025, 4:47:24 PM (2 days ago) Oct 27
          to Shuhei Takahashi, Keren Zhu, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
          Attention needed from Keren Zhu and Shuhei Takahashi

          Emilia Paz voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Keren Zhu
          • Shuhei Takahashi
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement 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: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
          Gerrit-Change-Number: 7052664
          Gerrit-PatchSet: 10
          Gerrit-Owner: Shuhei Takahashi <n...@chromium.org>
          Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
          Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
          Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
          Gerrit-Attention: Keren Zhu <kere...@chromium.org>
          Gerrit-Attention: Shuhei Takahashi <n...@chromium.org>
          Gerrit-Comment-Date: Mon, 27 Oct 2025 20:47:13 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Chromium LUCI CQ (Gerrit)

          unread,
          Oct 27, 2025, 9:37:05 PM (2 days ago) Oct 27
          to Shuhei Takahashi, Emilia Paz, Keren Zhu, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org

          Chromium LUCI CQ submitted the change

          Change information

          Commit message:
          extensions: Remove context menu callbacks from EAVC

          This is a part of the patch series to move stateful UI logic from
          ExtensionActionViewController to ExtensionActionPlatformDelegate.

          ExtensionsToolbarContainer needs to observe shown/closed events for
          context menus attached to toolbar action buttons to update some internal
          states. And we used to notify these events in the following path:

          ExtensionContextMenuController::ShowContextMenuForViewImpl()
          -> ToolbarActionViewController::OnContextMenuShown()
          = ExtensionActionViewController::OnContextMenuShown()
          -> ExtensionsContainer::OnContextMenuShownFromToolbar()
          = ExtensionsToolbarContainer::OnContextMenuShownFromToolbar()

          To reduce UI logic from ExtensionActionViewController, we don't want
          ExtensionActionViewController to appear in the middle.

          To achieve this, this patch reworks how these events are notified. We
          introduce the observer interface for ExtensionContextMenuController that
          allows its owner to subscribe to context menu events. The observer
          interface is implemented by two classes with following behavior:

          1. ToolbarActionView: notifies its owner via a delegate.
          2. ExtensionMenuItemView: does nothing.

          ToolbarActionView::Delegate is already implemented by
          ExtensionsToolbarContainer, so it can detect context menu events.

          The path for the example above will become:

          ExtensionContextMenuController::ShowContextMenuForViewImpl()
          -> ExtensionContextMenuController::Observer::OnContextMenuShown()
          = ToolbarActionView::OnContextMenuShown()
          -> ToolbarActionView::Delegate::OnContextMenuShown()
          = ExtensionsToolbarContainer::OnContextMenuShown()

          This is a pure refactor. No functional changes are expected.
          Bug: 448199168
          Change-Id: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
          Reviewed-by: Emilia Paz <emil...@chromium.org>
          Commit-Queue: Shuhei Takahashi <n...@chromium.org>
          Cr-Commit-Position: refs/heads/main@{#1536386}
          Files:
          • M chrome/browser/ui/extensions/extension_action_view_controller.cc
          • M chrome/browser/ui/extensions/extension_action_view_controller.h
          • M chrome/browser/ui/toolbar/toolbar_action_view_controller.h
          • M chrome/browser/ui/views/extensions/extension_context_menu_controller.cc
          • M chrome/browser/ui/views/extensions/extension_context_menu_controller.h
          • M chrome/browser/ui/views/extensions/extensions_container_views.h
          • M chrome/browser/ui/views/extensions/extensions_menu_item_view.cc
          • M chrome/browser/ui/views/extensions/extensions_menu_item_view.h
          • M chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
          • M chrome/browser/ui/views/extensions/extensions_toolbar_container.h
          • M chrome/browser/ui/views/toolbar/toolbar_action_view.cc
          • M chrome/browser/ui/views/toolbar/toolbar_action_view.h
          • M chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc
          • M chrome/browser/ui/webui_browser/webui_browser_extensions_container.cc
          • M chrome/browser/ui/webui_browser/webui_browser_extensions_container.h
          Change size: M
          Delta: 15 files changed, 100 insertions(+), 82 deletions(-)
          Branch: refs/heads/main
          Submit Requirements:
          • requirement satisfiedCode-Review: +1 by Emilia Paz
          Open in Gerrit
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: merged
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I01014d8cfafaf6479e518ec5b82ab29d23cf0d7a
          Gerrit-Change-Number: 7052664
          Gerrit-PatchSet: 11
          Gerrit-Owner: Shuhei Takahashi <n...@chromium.org>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
          Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
          Gerrit-Reviewer: Shuhei Takahashi <n...@chromium.org>
          open
          diffy
          satisfied_requirement
          Reply all
          Reply to author
          Forward
          0 new messages