[Desktop Android] Switch extension installed dialog to use DialogModel [chromium/src : main]

0 views
Skip to first unread message

Eva Su (Gerrit)

unread,
Oct 24, 2025, 5:25:34 PM (5 days ago) Oct 24
to Emilia Paz, Chromium LUCI CQ, AyeAye, srahim...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Emilia Paz

Eva Su 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: I1b496a5b04d7d32395893c2714bcfc42125a26f9
Gerrit-Change-Number: 7075980
Gerrit-PatchSet: 12
Gerrit-Owner: Eva Su <ev...@chromium.org>
Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
Gerrit-Reviewer: Eva Su <ev...@chromium.org>
Gerrit-Attention: Emilia Paz <emil...@chromium.org>
Gerrit-Comment-Date: Fri, 24 Oct 2025 21:25:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Emilia Paz (Gerrit)

unread,
Oct 27, 2025, 1:55:43 PM (2 days ago) Oct 27
to Eva Su, Chromium LUCI CQ, AyeAye, srahim...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Eva Su

Emilia Paz voted and added 7 comments

Votes added by Emilia Paz

Code-Review+1

7 comments

Patchset-level comments
File-level comment, Patchset 12 (Latest):
Emilia Paz . unresolved
Overall lgtm, thanks Eva! Just some small comments. This is a good first step. Some pointers for the work left:
- remove `BubbleDialogModelHost` and only use `ui::DialogModel`
- have the dialog delegate only do 'delegate stuff' and the show is handled separately (see comment)
- maybe rename to PostInstallDialog to avoid confusion? :)
File chrome/app/generated_resources.grd
Line 5856, Patchset 12 (Latest): <message name="IDS_EXTENSION_INSTALLED_MANAGE_SHORTCUTS_LINK_PLACEHOLDER" desc="A placeholder for the manage shortcuts link.">
<ph name="MANAGE_SHORTCUTS_LINK">$1<ex>Manage shortcuts</ex></ph>
</message>
Emilia Paz . unresolved

We can add the link to the existent one (IDS_EXTENSION_INSTALLED_MANAGE_SHORTCUTS), or if not remove that one since it's no longer used

File chrome/browser/ui/views/extensions/extension_installed_bubble_view.h
Line 29, Patchset 12 (Latest):class ExtensionInstalledBubbleView : public ui::DialogModelDelegate {
Emilia Paz . unresolved

This is technically not a `View` anymore. I think it's ok to leave the name as is for now because we are continue to refactor it. The goal would be to have a `ExtensionPostInstallDialogDelegate` that handles callbacks. The show method should be outside. Similar to https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/extensions/settings_overridden_dialog.cc;l=21-58

File chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
Line 50, Patchset 12 (Latest):#include "ui/views/controls/label.h"
Emilia Paz . unresolved

I think you can remove this. Check if other includes are not needed

Line 94, Patchset 12 (Latest): auto wrapper_view = std::make_unique<views::BoxLayoutView>();
wrapper_view->SetBackground(
views::CreateSolidBackground(ui::kColorSysNeutralContainer));
const auto& layout_provider = *views::LayoutProvider::Get();
const gfx::Insets dialog_insets =
layout_provider.GetInsetsMetric(views::InsetsMetric::INSETS_DIALOG);
wrapper_view->SetInsideBorderInsets(
gfx::Insets::VH(dialog_insets.top(), dialog_insets.left()));
Emilia Paz . unresolved

Couple of things:

  • Lets explain why we add color and insets -- feel free to reword:
  • ```
  • // Add color and insets to mimic the footnote view on the dialog. We cannot
  • // add the footnote using ui::DialogModel because it doesn't support
  • // complex footers.
  • ```
  • Are the insets needed on top of using `views::BubbleDialogModelHost::FieldType::kMenuItem`? Edit: yeah, after local build it does need both. Comment will be good to explain it then
  • Also maybe rename to `CreateSigninPromoFootnoteView` since we are customizing it to look like a footer?
Line 116, Patchset 12 (Latest): //
// -------------------------
// | Icon | Title (x) |
// | Info |
// | Extra info |
// -------------------------
Emilia Paz . unresolved

This is not true anymore, right? The info and extra info are under the icon. Since now we are using the model and not adding custom view, I think we can reword this whole comment. Extra info is different than footer

Line 175, Patchset 12 (Latest): dialog_model_builder.AddCustomField(
std::make_unique<views::BubbleDialogModelHost::CustomView>(
CreateSigninPromoView(
browser->tab_strip_model()->GetActiveWebContents(),
weak_delegate->model()->extension_id()),
views::BubbleDialogModelHost::FieldType::kMenuItem));
Emilia Paz . unresolved

Add a comment that we add custom field instead of footnote because footnote doesn't support complex view (here or inside CreateSigninPromoView(), depending on wording)

Open in Gerrit

Related details

Attention is currently required from:
  • Eva Su
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not 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: I1b496a5b04d7d32395893c2714bcfc42125a26f9
Gerrit-Change-Number: 7075980
Gerrit-PatchSet: 12
Gerrit-Owner: Eva Su <ev...@chromium.org>
Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
Gerrit-Reviewer: Eva Su <ev...@chromium.org>
Gerrit-Attention: Eva Su <ev...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Oct 2025 17:55:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Eva Su (Gerrit)

unread,
Oct 27, 2025, 4:22:19 PM (2 days ago) Oct 27
to Emilia Paz, Chromium LUCI CQ, AyeAye, srahim...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Emilia Paz

Eva Su added 7 comments

Patchset-level comments
Overall lgtm, thanks Eva! Just some small comments. This is a good first step. Some pointers for the work left:
- remove `BubbleDialogModelHost` and only use `ui::DialogModel`
- have the dialog delegate only do 'delegate stuff' and the show is handled separately (see comment)
- maybe rename to PostInstallDialog to avoid confusion? :)
Eva Su

Acknowledged and will do in the next CL, thanks!

File chrome/app/generated_resources.grd
Line 5856, Patchset 12: <message name="IDS_EXTENSION_INSTALLED_MANAGE_SHORTCUTS_LINK_PLACEHOLDER" desc="A placeholder for the manage shortcuts link.">

<ph name="MANAGE_SHORTCUTS_LINK">$1<ex>Manage shortcuts</ex></ph>
</message>
Emilia Paz . resolved

We can add the link to the existent one (IDS_EXTENSION_INSTALLED_MANAGE_SHORTCUTS), or if not remove that one since it's no longer used

Eva Su

Done

File chrome/browser/ui/views/extensions/extension_installed_bubble_view.h
Line 29, Patchset 12:class ExtensionInstalledBubbleView : public ui::DialogModelDelegate {
Emilia Paz . resolved

This is technically not a `View` anymore. I think it's ok to leave the name as is for now because we are continue to refactor it. The goal would be to have a `ExtensionPostInstallDialogDelegate` that handles callbacks. The show method should be outside. Similar to https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/extensions/settings_overridden_dialog.cc;l=21-58

Eva Su

Got it, yes, I'll be renaming it to `ExtensionPostInstallDialogDelegate` as well as refactoring it to handle callbacks in the next CL.

File chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
Line 50, Patchset 12:#include "ui/views/controls/label.h"
Emilia Paz . resolved

I think you can remove this. Check if other includes are not needed

Eva Su

Done

Line 94, Patchset 12: auto wrapper_view = std::make_unique<views::BoxLayoutView>();

wrapper_view->SetBackground(
views::CreateSolidBackground(ui::kColorSysNeutralContainer));
const auto& layout_provider = *views::LayoutProvider::Get();
const gfx::Insets dialog_insets =
layout_provider.GetInsetsMetric(views::InsetsMetric::INSETS_DIALOG);
wrapper_view->SetInsideBorderInsets(
gfx::Insets::VH(dialog_insets.top(), dialog_insets.left()));
Emilia Paz . resolved

Couple of things:

  • Lets explain why we add color and insets -- feel free to reword:
  • ```
  • // Add color and insets to mimic the footnote view on the dialog. We cannot
  • // add the footnote using ui::DialogModel because it doesn't support
  • // complex footers.
  • ```
  • Are the insets needed on top of using `views::BubbleDialogModelHost::FieldType::kMenuItem`? Edit: yeah, after local build it does need both. Comment will be good to explain it then
  • Also maybe rename to `CreateSigninPromoFootnoteView` since we are customizing it to look like a footer?
Eva Su

Thanks! Added comments, renamed to `CreateSigninPromoFootnoteView`, and updated to use `ui::kColorBubbleFooterBackground` and tested via demo that the background color is still correct.


// -------------------------
// | Icon | Title (x) |
// | Info |
// | Extra info |
// -------------------------
Emilia Paz . resolved

This is not true anymore, right? The info and extra info are under the icon. Since now we are using the model and not adding custom view, I think we can reword this whole comment. Extra info is different than footer

Eva Su

Done

Line 175, Patchset 12: dialog_model_builder.AddCustomField(

std::make_unique<views::BubbleDialogModelHost::CustomView>(
CreateSigninPromoView(
browser->tab_strip_model()->GetActiveWebContents(),
weak_delegate->model()->extension_id()),
views::BubbleDialogModelHost::FieldType::kMenuItem));
Emilia Paz . resolved

Add a comment that we add custom field instead of footnote because footnote doesn't support complex view (here or inside CreateSigninPromoView(), depending on wording)

Eva Su

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Emilia Paz
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I1b496a5b04d7d32395893c2714bcfc42125a26f9
    Gerrit-Change-Number: 7075980
    Gerrit-PatchSet: 15
    Gerrit-Owner: Eva Su <ev...@chromium.org>
    Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
    Gerrit-Reviewer: Eva Su <ev...@chromium.org>
    Gerrit-Attention: Emilia Paz <emil...@chromium.org>
    Gerrit-Comment-Date: Mon, 27 Oct 2025 20:22:09 +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 27, 2025, 4:46:07 PM (2 days ago) Oct 27
    to Eva Su, Tim, Chromium LUCI CQ, AyeAye, srahim...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Eva Su and Tim

    Emilia Paz voted and added 3 comments

    Votes added by Emilia Paz

    Code-Review+1

    3 comments

    Patchset-level comments
    File-level comment, Patchset 15 (Latest):
    Emilia Paz . resolved

    Great! Thanks Eva

    File chrome/app/generated_resources.grd
    Line 5855, Patchset 15 (Latest): <message name="IDS_EXTENSION_INSTALLED_MANAGE_SHORTCUTS" desc="Text for the link in the InfoBubble that opens the chrome://extensions page with the Configure Commands UI visible.">
    Emilia Paz . unresolved

    super nit: Lets update this comment, it's not an info bubble anymore. And the link content is the current one?

    File chrome/browser/ui/views/extensions/extension_installed_bubble_view.h
    Line 18, Patchset 15 (Latest):#include "ui/views/bubble/bubble_dialog_delegate_view.h"
    Emilia Paz . unresolved

    nit: remove

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Eva Su
    • Tim
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not 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: I1b496a5b04d7d32395893c2714bcfc42125a26f9
      Gerrit-Change-Number: 7075980
      Gerrit-PatchSet: 15
      Gerrit-Owner: Eva Su <ev...@chromium.org>
      Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
      Gerrit-Reviewer: Eva Su <ev...@chromium.org>
      Gerrit-Reviewer: Tim <tjud...@chromium.org>
      Gerrit-Attention: Eva Su <ev...@chromium.org>
      Gerrit-Attention: Tim <tjud...@chromium.org>
      Gerrit-Comment-Date: Mon, 27 Oct 2025 20:45:56 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Eva Su (Gerrit)

      unread,
      Oct 27, 2025, 4:59:01 PM (2 days ago) Oct 27
      to Emilia Paz, Tim, Chromium LUCI CQ, AyeAye, srahim...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
      Attention needed from Emilia Paz and Tim

      Eva Su added 2 comments

      File chrome/app/generated_resources.grd
      Line 5855, Patchset 15: <message name="IDS_EXTENSION_INSTALLED_MANAGE_SHORTCUTS" desc="Text for the link in the InfoBubble that opens the chrome://extensions page with the Configure Commands UI visible.">
      Emilia Paz . resolved

      super nit: Lets update this comment, it's not an info bubble anymore. And the link content is the current one?

      Eva Su

      Done

      File chrome/browser/ui/views/extensions/extension_installed_bubble_view.h
      Line 18, Patchset 15:#include "ui/views/bubble/bubble_dialog_delegate_view.h"
      Emilia Paz . resolved

      nit: remove

      Eva Su

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Emilia Paz
      • Tim
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement 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: I1b496a5b04d7d32395893c2714bcfc42125a26f9
        Gerrit-Change-Number: 7075980
        Gerrit-PatchSet: 16
        Gerrit-Owner: Eva Su <ev...@chromium.org>
        Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
        Gerrit-Reviewer: Eva Su <ev...@chromium.org>
        Gerrit-Reviewer: Tim <tjud...@chromium.org>
        Gerrit-Attention: Tim <tjud...@chromium.org>
        Gerrit-Attention: Emilia Paz <emil...@chromium.org>
        Gerrit-Comment-Date: Mon, 27 Oct 2025 20:58:52 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Tim (Gerrit)

        unread,
        Oct 27, 2025, 5:06:20 PM (2 days ago) Oct 27
        to Eva Su, Emilia Paz, Chromium LUCI CQ, AyeAye, srahim...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
        Attention needed from Eva Su

        Tim voted and added 2 comments

        Votes added by Tim

        Code-Review+1

        2 comments

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

        Nice, LGTM! Just a stray include that can be removed.

        File chrome/browser/ui/views/extensions/extension_installed_bubble_view.h
        Line 18, Patchset 15:#include "ui/views/bubble/bubble_dialog_delegate_view.h"
        Tim . unresolved

        nit: Looks like we can remove this header now?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Eva Su
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not 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: I1b496a5b04d7d32395893c2714bcfc42125a26f9
          Gerrit-Change-Number: 7075980
          Gerrit-PatchSet: 17
          Gerrit-Owner: Eva Su <ev...@chromium.org>
          Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
          Gerrit-Reviewer: Eva Su <ev...@chromium.org>
          Gerrit-Reviewer: Tim <tjud...@chromium.org>
          Gerrit-Attention: Eva Su <ev...@chromium.org>
          Gerrit-Comment-Date: Mon, 27 Oct 2025 21:06:06 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Eva Su (Gerrit)

          unread,
          Oct 27, 2025, 5:36:51 PM (2 days ago) Oct 27
          to Tim, Emilia Paz, Chromium LUCI CQ, AyeAye, srahim...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org

          Eva Su added 1 comment

          File chrome/browser/ui/views/extensions/extension_installed_bubble_view.h
          Line 18, Patchset 15:#include "ui/views/bubble/bubble_dialog_delegate_view.h"
          Tim . resolved

          nit: Looks like we can remove this header now?

          Eva Su

          Thanks, this was removed in the last commit :)

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement is not 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: I1b496a5b04d7d32395893c2714bcfc42125a26f9
            Gerrit-Change-Number: 7075980
            Gerrit-PatchSet: 17
            Gerrit-Owner: Eva Su <ev...@chromium.org>
            Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
            Gerrit-Reviewer: Eva Su <ev...@chromium.org>
            Gerrit-Reviewer: Tim <tjud...@chromium.org>
            Gerrit-Comment-Date: Mon, 27 Oct 2025 21:36:41 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Tim <tjud...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages