Add a multi-modal glic sharing manager. [chromium/src : main]

0 views
Skip to first unread message

Bryant Chandler (Gerrit)

unread,
12:11 PM (9 hours ago) 12:11 PM
to Marke Hallowell, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Marke Hallowell

Bryant Chandler added 2 comments

File chrome/browser/glic/host/context/glic_multi_modal_sharing_manager.h
Line 25, Patchset 1:class GlicMultiModalSharingManager {
Bryant Chandler . unresolved

I wonder if there's a different name we could use for this. I was a little confused with calling it a sharing manager since it doesn't implement the sharing manager interface.

File chrome/browser/glic/service/glic_instance_impl.cc
Line 195, Patchset 1: std::make_unique<GlicMultiModalSharingManager>(profile,
Bryant Chandler . unresolved

Does this actually need to be a unique_ptr?

Open in Gerrit

Related details

Attention is currently required from:
  • Marke Hallowell
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: I1aa03ccbddbf39ab70e15a9d54774520df8e4826
Gerrit-Change-Number: 7477316
Gerrit-PatchSet: 2
Gerrit-Owner: Marke Hallowell <w...@chromium.org>
Gerrit-Reviewer: Bryant Chandler <bryantc...@chromium.org>
Gerrit-Reviewer: Marke Hallowell <w...@chromium.org>
Gerrit-Attention: Marke Hallowell <w...@chromium.org>
Gerrit-Comment-Date: Thu, 15 Jan 2026 17:10:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Marke Hallowell (Gerrit)

unread,
1:03 PM (8 hours ago) 1:03 PM
to Chromium LUCI CQ, Bryant Chandler, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Bryant Chandler

Marke Hallowell voted and added 2 comments

Votes added by Marke Hallowell

Commit-Queue+1

2 comments

File chrome/browser/glic/host/context/glic_multi_modal_sharing_manager.h
Line 25, Patchset 1:class GlicMultiModalSharingManager {
Bryant Chandler . resolved

I wonder if there's a different name we could use for this. I was a little confused with calling it a sharing manager since it doesn't implement the sharing manager interface.

Marke Hallowell

Done

File chrome/browser/glic/service/glic_instance_impl.cc
Line 195, Patchset 1: std::make_unique<GlicMultiModalSharingManager>(profile,
Bryant Chandler . resolved

Does this actually need to be a unique_ptr?

Marke Hallowell

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Bryant Chandler
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: I1aa03ccbddbf39ab70e15a9d54774520df8e4826
    Gerrit-Change-Number: 7477316
    Gerrit-PatchSet: 2
    Gerrit-Owner: Marke Hallowell <w...@chromium.org>
    Gerrit-Reviewer: Bryant Chandler <bryantc...@chromium.org>
    Gerrit-Reviewer: Marke Hallowell <w...@chromium.org>
    Gerrit-Attention: Bryant Chandler <bryantc...@chromium.org>
    Gerrit-Comment-Date: Thu, 15 Jan 2026 18:03:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Bryant Chandler <bryantc...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Bryant Chandler (Gerrit)

    unread,
    2:31 PM (6 hours ago) 2:31 PM
    to Marke Hallowell, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Marke Hallowell

    Bryant Chandler added 2 comments

    File chrome/browser/glic/host/context/glic_sharing_manager_coordinator.cc
    Line 51, Patchset 3 (Latest):#if !BUILDFLAG(IS_ANDROID)
    std::make_unique<GlicPinnedTabManagerImpl>(profile,
    ui_delegate,
    metrics)
    #else
    std::make_unique<GlicEmptyPinnedTabManager>()
    #endif
    Bryant Chandler . unresolved

    The real pinned tab manager now compiles on android, so we can get rid of this ifdef

    File chrome/browser/glic/service/glic_instance_impl.cc
    Line 1117, Patchset 3 (Latest): sharing_manager_coordinator_.OnGlicWindowActivationChanged(is_active &&
    Bryant Chandler . unresolved

    Seems like we could use sharing_manager() and not add this method to the coordinator at all. It's just delegating anyway.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Marke Hallowell
    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: I1aa03ccbddbf39ab70e15a9d54774520df8e4826
      Gerrit-Change-Number: 7477316
      Gerrit-PatchSet: 3
      Gerrit-Owner: Marke Hallowell <w...@chromium.org>
      Gerrit-Reviewer: Bryant Chandler <bryantc...@chromium.org>
      Gerrit-Reviewer: Marke Hallowell <w...@chromium.org>
      Gerrit-Attention: Marke Hallowell <w...@chromium.org>
      Gerrit-Comment-Date: Thu, 15 Jan 2026 19:31:19 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Marke Hallowell (Gerrit)

      unread,
      4:03 PM (5 hours ago) 4:03 PM
      to Chromium LUCI CQ, Bryant Chandler, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
      Attention needed from Bryant Chandler

      Marke Hallowell added 2 comments

      File chrome/browser/glic/host/context/glic_sharing_manager_coordinator.cc
      Line 51, Patchset 3:#if !BUILDFLAG(IS_ANDROID)

      std::make_unique<GlicPinnedTabManagerImpl>(profile,
      ui_delegate,
      metrics)
      #else
      std::make_unique<GlicEmptyPinnedTabManager>()
      #endif
      Bryant Chandler . resolved

      The real pinned tab manager now compiles on android, so we can get rid of this ifdef

      Marke Hallowell

      Done

      File chrome/browser/glic/service/glic_instance_impl.cc
      Line 1117, Patchset 3: sharing_manager_coordinator_.OnGlicWindowActivationChanged(is_active &&
      Bryant Chandler . resolved

      Seems like we could use sharing_manager() and not add this method to the coordinator at all. It's just delegating anyway.

      Marke Hallowell

      I prefer keeping "sharing_manager()" limited to the broader sharing manager interface (which this method is not currently part of). So we could return the very specific sharing manager instance here and have it use that, but that limits what the coordinator is allowed to do internally (I think we want the layer of indirection to be a layer of indirection and not leak implementation details).

      This seemed liked the best short term option to me, but if you feel strongly about it I can refactor it to return a GlicStablePinningSharingManager instead and then use it directly.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Bryant Chandler
      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: I1aa03ccbddbf39ab70e15a9d54774520df8e4826
        Gerrit-Change-Number: 7477316
        Gerrit-PatchSet: 4
        Gerrit-Owner: Marke Hallowell <w...@chromium.org>
        Gerrit-Reviewer: Bryant Chandler <bryantc...@chromium.org>
        Gerrit-Reviewer: Marke Hallowell <w...@chromium.org>
        Gerrit-Attention: Bryant Chandler <bryantc...@chromium.org>
        Gerrit-Comment-Date: Thu, 15 Jan 2026 21:03:38 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Bryant Chandler <bryantc...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Bryant Chandler (Gerrit)

        unread,
        4:07 PM (5 hours ago) 4:07 PM
        to Marke Hallowell, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
        Attention needed from Marke Hallowell

        Bryant Chandler voted and added 1 comment

        Votes added by Bryant Chandler

        Code-Review+1

        1 comment

        File chrome/browser/glic/service/glic_instance_impl.cc
        Line 1117, Patchset 3: sharing_manager_coordinator_.OnGlicWindowActivationChanged(is_active &&
        Bryant Chandler . resolved

        Seems like we could use sharing_manager() and not add this method to the coordinator at all. It's just delegating anyway.

        Marke Hallowell

        I prefer keeping "sharing_manager()" limited to the broader sharing manager interface (which this method is not currently part of). So we could return the very specific sharing manager instance here and have it use that, but that limits what the coordinator is allowed to do internally (I think we want the layer of indirection to be a layer of indirection and not leak implementation details).

        This seemed liked the best short term option to me, but if you feel strongly about it I can refactor it to return a GlicStablePinningSharingManager instead and then use it directly.

        Bryant Chandler

        Ah. I had missed that. If we want to keep it in the private interface then we can leave it as is.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Marke Hallowell
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • 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: I1aa03ccbddbf39ab70e15a9d54774520df8e4826
        Gerrit-Change-Number: 7477316
        Gerrit-PatchSet: 4
        Gerrit-Owner: Marke Hallowell <w...@chromium.org>
        Gerrit-Reviewer: Bryant Chandler <bryantc...@chromium.org>
        Gerrit-Reviewer: Marke Hallowell <w...@chromium.org>
        Gerrit-Attention: Marke Hallowell <w...@chromium.org>
        Gerrit-Comment-Date: Thu, 15 Jan 2026 21:06:38 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Marke Hallowell <w...@chromium.org>
        Comment-In-Reply-To: Bryant Chandler <bryantc...@chromium.org>
        satisfied_requirement
        open
        diffy

        Marke Hallowell (Gerrit)

        unread,
        5:35 PM (3 hours ago) 5:35 PM
        to Bryant Chandler, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org

        Marke Hallowell voted Commit-Queue+2

        Commit-Queue+2
        Open in Gerrit

        Related details

        Attention set is empty
        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: I1aa03ccbddbf39ab70e15a9d54774520df8e4826
        Gerrit-Change-Number: 7477316
        Gerrit-PatchSet: 5
        Gerrit-Owner: Marke Hallowell <w...@chromium.org>
        Gerrit-Reviewer: Bryant Chandler <bryantc...@chromium.org>
        Gerrit-Reviewer: Marke Hallowell <w...@chromium.org>
        Gerrit-Comment-Date: Thu, 15 Jan 2026 22:35:07 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        6:22 PM (2 hours ago) 6:22 PM
        to Marke Hallowell, Bryant Chandler, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org

        Chromium LUCI CQ submitted the change

        Unreviewed changes

        4 is the latest approved patch-set.
        No files were changed between the latest approved patch-set and the submitted one.

        Change information

        Commit message:
        Add a multi-modal glic sharing manager.

        GlicInstanceImpl requires mode-specific sharing manager implementations.
        This cl moves the management of that out of GlicInstanceImpl itself and
        into a newly created GlicMultiModalSharingManager class.
        Bug: None
        Change-Id: I1aa03ccbddbf39ab70e15a9d54774520df8e4826
        Commit-Queue: Marke Hallowell <w...@chromium.org>
        Reviewed-by: Bryant Chandler <bryantc...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1570053}
        Files:
        • M chrome/browser/glic/BUILD.gn
        • A chrome/browser/glic/host/context/glic_sharing_manager_coordinator.cc
        • A chrome/browser/glic/host/context/glic_sharing_manager_coordinator.h
        • M chrome/browser/glic/service/glic_instance_impl.cc
        • M chrome/browser/glic/service/glic_instance_impl.h
        Change size: L
        Delta: 5 files changed, 229 insertions(+), 128 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Bryant Chandler
        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: I1aa03ccbddbf39ab70e15a9d54774520df8e4826
        Gerrit-Change-Number: 7477316
        Gerrit-PatchSet: 6
        Gerrit-Owner: Marke Hallowell <w...@chromium.org>
        Gerrit-Reviewer: Bryant Chandler <bryantc...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Marke Hallowell <w...@chromium.org>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages