[Contextual Tasks] Implement Android Panel Host [chromium/src : main]

0 views
Skip to first unread message

Sho Biswas (Gerrit)

unread,
Mar 20, 2026, 4:54:33 PM (4 days ago) Mar 20
to AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang, ortuno...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, titoua...@chromium.org, devtools...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, dewitt...@chromium.org
Attention needed from Sho Biswas

Message from Sho Biswas

Set Ready For Review

Open in Gerrit

Related details

Attention is currently required from:
  • Sho Biswas
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: I603b6b3af3ca6f0bf82e95f6b5e86730c4e0061b
Gerrit-Change-Number: 7677298
Gerrit-PatchSet: 6
Gerrit-Owner: Sho Biswas <sho...@google.com>
Gerrit-Reviewer: Sho Biswas <sho...@google.com>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: Sho Biswas <sho...@google.com>
Gerrit-Comment-Date: Fri, 20 Mar 2026 20:54:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Shakti Sahu (Gerrit)

unread,
Mar 20, 2026, 6:32:39 PM (4 days ago) Mar 20
to Sho Biswas, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang, ortuno...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, titoua...@chromium.org, devtools...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, dewitt...@chromium.org
Attention needed from Sho Biswas

Shakti Sahu voted and added 3 comments

Votes added by Shakti Sahu

Code-Review+1

3 comments

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Shakti Sahu . resolved

Mostly lgtm

File chrome/browser/contextual_tasks/android/contextual_tasks_panel_host_android.cc
Line 59, Patchset 7 (Latest): return !!GetTabAndroid();
Shakti Sahu . unresolved

This feels wrong because if there isn't an active tab (somehow), it will go from uninitialized -> initialized -> uninitialized.

I dont know what `IsPanelInitialized` is useful for. On desktop I see that it's for tracking `web_view_` creation which is an async operation?

Should it be just `true` in android?

Line 97, Patchset 7 (Latest): observers_.Notify(&ContextualTasksPanelHost::Observer::OnSurfaceStateChanged,
Shakti Sahu . unresolved

This and line 42 invoke the OnSurfaceStateChanged which triggers this logic in the controller
https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/contextual_tasks/contextual_tasks_side_panel_coordinator.cc;drc=3f7112dccdaf8ad032ee03247030eb43cfc8d706;l=977

Based on SystemAction / Useraction we do different thigns there. Not super clear. Something to watch out and revisit

Open in Gerrit

Related details

Attention is currently required from:
  • Sho Biswas
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: I603b6b3af3ca6f0bf82e95f6b5e86730c4e0061b
Gerrit-Change-Number: 7677298
Gerrit-PatchSet: 7
Gerrit-Owner: Sho Biswas <sho...@google.com>
Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
Gerrit-Reviewer: Sho Biswas <sho...@google.com>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: Sho Biswas <sho...@google.com>
Gerrit-Comment-Date: Fri, 20 Mar 2026 22:32:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Sho Biswas (Gerrit)

unread,
Mar 20, 2026, 7:36:37 PM (3 days ago) Mar 20
to Shakti Sahu, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang, ortuno...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, titoua...@chromium.org, devtools...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, dewitt...@chromium.org
Attention needed from Shakti Sahu

Sho Biswas added 2 comments

File chrome/browser/contextual_tasks/android/contextual_tasks_panel_host_android.cc
Line 59, Patchset 7: return !!GetTabAndroid();
Shakti Sahu . resolved

This feels wrong because if there isn't an active tab (somehow), it will go from uninitialized -> initialized -> uninitialized.

I dont know what `IsPanelInitialized` is useful for. On desktop I see that it's for tracking `web_view_` creation which is an async operation?

Should it be just `true` in android?

Sho Biswas

It's just because the side panel framework on desktop is async, so there's a call to UpdateWebContentsForActiveTab when the side panel is initialized. I don't remember exactly what problems this caused, but maybe we can deprecate it.

For now, let's just go with true.

Line 97, Patchset 7: observers_.Notify(&ContextualTasksPanelHost::Observer::OnSurfaceStateChanged,
Shakti Sahu . resolved

This and line 42 invoke the OnSurfaceStateChanged which triggers this logic in the controller
https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/contextual_tasks/contextual_tasks_side_panel_coordinator.cc;drc=3f7112dccdaf8ad032ee03247030eb43cfc8d706;l=977

Based on SystemAction / Useraction we do different thigns there. Not super clear. Something to watch out and revisit

Sho Biswas

Agreed -- the systemaction case was to address the UpdateWebContentsForActiveTab case I mentioned in the other comment. So I'll leave these as useraction since that's the more typical use case.

Open in Gerrit

Related details

Attention is currently required from:
  • Shakti Sahu
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: I603b6b3af3ca6f0bf82e95f6b5e86730c4e0061b
    Gerrit-Change-Number: 7677298
    Gerrit-PatchSet: 8
    Gerrit-Owner: Sho Biswas <sho...@google.com>
    Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Reviewer: Sho Biswas <sho...@google.com>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Mar 2026 23:36:31 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Shakti Sahu <shakt...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Shakti Sahu (Gerrit)

    unread,
    Mar 20, 2026, 8:02:17 PM (3 days ago) Mar 20
    to Sho Biswas, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang, ortuno...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, titoua...@chromium.org, devtools...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, dewitt...@chromium.org
    Attention needed from Sho Biswas

    Shakti Sahu voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Sho Biswas
    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: I603b6b3af3ca6f0bf82e95f6b5e86730c4e0061b
      Gerrit-Change-Number: 7677298
      Gerrit-PatchSet: 8
      Gerrit-Owner: Sho Biswas <sho...@google.com>
      Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
      Gerrit-Reviewer: Sho Biswas <sho...@google.com>
      Gerrit-CC: Sophie Chang <sophi...@chromium.org>
      Gerrit-Attention: Sho Biswas <sho...@google.com>
      Gerrit-Comment-Date: Sat, 21 Mar 2026 00:02:02 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Khanh Nguyen (Gerrit)

      unread,
      Mar 20, 2026, 8:08:17 PM (3 days ago) Mar 20
      to Sho Biswas, Shakti Sahu, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang, ortuno...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, titoua...@chromium.org, devtools...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, dewitt...@chromium.org
      Attention needed from Sho Biswas

      Khanh Nguyen voted

      Code-Review+1
      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Sho Biswas
      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: I603b6b3af3ca6f0bf82e95f6b5e86730c4e0061b
        Gerrit-Change-Number: 7677298
        Gerrit-PatchSet: 8
        Gerrit-Owner: Sho Biswas <sho...@google.com>
        Gerrit-Reviewer: Khanh Nguyen <khan...@google.com>
        Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
        Gerrit-Reviewer: Sho Biswas <sho...@google.com>
        Gerrit-CC: Sophie Chang <sophi...@chromium.org>
        Gerrit-Attention: Sho Biswas <sho...@google.com>
        Gerrit-Comment-Date: Sat, 21 Mar 2026 00:08:06 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Shakti Sahu (Gerrit)

        unread,
        Mar 23, 2026, 3:46:24 PM (15 hours ago) Mar 23
        to Sho Biswas, Khanh Nguyen, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang, ortuno...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, titoua...@chromium.org, devtools...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, dewitt...@chromium.org
        Attention needed from Sho Biswas

        Shakti Sahu voted

        Code-Review+1
        Commit-Queue+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Sho Biswas
        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: I603b6b3af3ca6f0bf82e95f6b5e86730c4e0061b
        Gerrit-Change-Number: 7677298
        Gerrit-PatchSet: 9
        Gerrit-Owner: Sho Biswas <sho...@google.com>
        Gerrit-Reviewer: Khanh Nguyen <khan...@google.com>
        Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
        Gerrit-Reviewer: Sho Biswas <sho...@google.com>
        Gerrit-CC: Sophie Chang <sophi...@chromium.org>
        Gerrit-Attention: Sho Biswas <sho...@google.com>
        Gerrit-Comment-Date: Mon, 23 Mar 2026 19:46:14 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Shakti Sahu (Gerrit)

        unread,
        Mar 23, 2026, 5:43:40 PM (13 hours ago) Mar 23
        to Sho Biswas, Khanh Nguyen, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang, ortuno...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, titoua...@chromium.org, devtools...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, dewitt...@chromium.org
        Attention needed from Sho Biswas

        Shakti Sahu voted Commit-Queue+2

        Commit-Queue+2
        Gerrit-Comment-Date: Mon, 23 Mar 2026 21:43:29 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Mar 23, 2026, 6:51:47 PM (12 hours ago) Mar 23
        to Sho Biswas, Shakti Sahu, Khanh Nguyen, AyeAye, chromium...@chromium.org, Sophie Chang, ortuno...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, titoua...@chromium.org, devtools...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, dewitt...@chromium.org

        Chromium LUCI CQ submitted the change

        Unreviewed changes

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

        Change information

        Commit message:
        [Contextual Tasks] Implement Android Panel Host

        Provides the concrete Android implementation of ContextualTasksPanelHost
        using the TabBottomSheetConnector.

        This enables the Contextual Tasks feature to display its UI within
        the Android bottom sheet container, with full support for lifecycle
        events and WebContents management.

        Also includes unit tests for the new host implementation.
        Bug: 493303612
        Change-Id: I603b6b3af3ca6f0bf82e95f6b5e86730c4e0061b
        Reviewed-by: Shakti Sahu <shakt...@chromium.org>
        Commit-Queue: Shakti Sahu <shakt...@chromium.org>
        Reviewed-by: Khanh Nguyen <khan...@google.com>
        Cr-Commit-Position: refs/heads/main@{#1603759}
        Files:
        • M chrome/browser/contextual_tasks/BUILD.gn
        • M chrome/browser/contextual_tasks/android/contextual_tasks_panel_host_android.cc
        • M chrome/browser/contextual_tasks/android/contextual_tasks_panel_host_android.h
        Change size: M
        Delta: 3 files changed, 136 insertions(+), 16 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Shakti Sahu, +1 by Khanh Nguyen
        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: I603b6b3af3ca6f0bf82e95f6b5e86730c4e0061b
        Gerrit-Change-Number: 7677298
        Gerrit-PatchSet: 11
        Gerrit-Owner: Sho Biswas <sho...@google.com>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Khanh Nguyen <khan...@google.com>
        Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
        Gerrit-Reviewer: Sho Biswas <sho...@google.com>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages