[ChromeAndroidTask] Support activity-scoped features [chromium/src : main]

0 views
Skip to first unread message

Lijin Shen (Gerrit)

unread,
Feb 18, 2026, 2:03:17 PM (2 days ago) Feb 18
to Linyu He, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Linyu He

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Linyu He
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: I85e0361f89a9db0fbb68a3d6a6dc117e2aba8bcb
Gerrit-Change-Number: 7585362
Gerrit-PatchSet: 3
Gerrit-Owner: Lijin Shen <laz...@google.com>
Gerrit-Reviewer: Lijin Shen <laz...@google.com>
Gerrit-Reviewer: Linyu He <lin...@google.com>
Gerrit-Attention: Linyu He <lin...@google.com>
Gerrit-Comment-Date: Wed, 18 Feb 2026 19:03:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Linyu He (Gerrit)

unread,
Feb 18, 2026, 3:49:25 PM (2 days ago) Feb 18
to Lijin Shen, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Lijin Shen

Linyu He voted and added 4 comments

Votes added by Linyu He

Code-Review+1

4 comments

File chrome/browser/ui/browser_window/internal/android/java/src/org/chromium/chrome/browser/ui/browser_window/ChromeAndroidTaskImpl.java
Line 1281, Patchset 3 (Latest): var iterator = mFeatures.entrySet().iterator();
while (iterator.hasNext()) {
var entry = iterator.next();
var key = entry.getKey();
Linyu He . unresolved

nit - replace `var`s here with specific types as it's hard to tell the types from variable names.

Line 1285, Patchset 3 (Latest): if (Objects.equals(activityWindowAndroid, key.mActivityWindowAndroid)) {
Linyu He . unresolved

nit - use `activityScopedObjectsToRemove` for consistency with Line 1279.

Also, just use `==` here? I think we do want to compare the references.

File chrome/browser/ui/browser_window/public/android/java/src/org/chromium/chrome/browser/ui/browser_window/ChromeAndroidTaskFeatureKey.java
Line 27, Patchset 3 (Latest): * The activity window the feature is associated with, or null if the feature is not associated
Linyu He . unresolved

nit - remove "window" from the javadoc; it could be confusing as (Activity != window) on Android.

```suggestion
* The activity the feature is associated with, or null if the feature is not associated
```
Line 50, Patchset 3 (Latest): * @param activityWindowAndroid The activity window the feature is associated with, or null if
Linyu He . unresolved
```suggestion
* @param activityWindowAndroid The activity the feature is associated with, or null if
```
Open in Gerrit

Related details

Attention is currently required from:
  • Lijin Shen
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: I85e0361f89a9db0fbb68a3d6a6dc117e2aba8bcb
    Gerrit-Change-Number: 7585362
    Gerrit-PatchSet: 3
    Gerrit-Owner: Lijin Shen <laz...@google.com>
    Gerrit-Reviewer: Lijin Shen <laz...@google.com>
    Gerrit-Reviewer: Linyu He <lin...@google.com>
    Gerrit-Attention: Lijin Shen <laz...@google.com>
    Gerrit-Comment-Date: Wed, 18 Feb 2026 20:49:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lijin Shen (Gerrit)

    unread,
    Feb 18, 2026, 6:24:55 PM (2 days ago) Feb 18
    to Linyu He, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Linyu He

    Lijin Shen added 4 comments

    File chrome/browser/ui/browser_window/internal/android/java/src/org/chromium/chrome/browser/ui/browser_window/ChromeAndroidTaskImpl.java
    Line 1281, Patchset 3: var iterator = mFeatures.entrySet().iterator();

    while (iterator.hasNext()) {
    var entry = iterator.next();
    var key = entry.getKey();
    Linyu He . resolved

    nit - replace `var`s here with specific types as it's hard to tell the types from variable names.

    Lijin Shen

    Done

    Line 1285, Patchset 3: if (Objects.equals(activityWindowAndroid, key.mActivityWindowAndroid)) {
    Linyu He . unresolved

    nit - use `activityScopedObjectsToRemove` for consistency with Line 1279.

    Also, just use `==` here? I think we do want to compare the references.

    Lijin Shen

    use activityScopedObjectsToRemove for consistency with Line 1279

    didn't quite follow here. which variable were you referring to?

    File chrome/browser/ui/browser_window/public/android/java/src/org/chromium/chrome/browser/ui/browser_window/ChromeAndroidTaskFeatureKey.java
    Line 27, Patchset 3: * The activity window the feature is associated with, or null if the feature is not associated
    Linyu He . resolved

    nit - remove "window" from the javadoc; it could be confusing as (Activity != window) on Android.

    ```suggestion
    * The activity the feature is associated with, or null if the feature is not associated
    ```
    Lijin Shen

    Done

    Line 50, Patchset 3: * @param activityWindowAndroid The activity window the feature is associated with, or null if
    Linyu He . resolved
    ```suggestion
    * @param activityWindowAndroid The activity the feature is associated with, or null if
    ```
    Lijin Shen

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Linyu He
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: I85e0361f89a9db0fbb68a3d6a6dc117e2aba8bcb
    Gerrit-Change-Number: 7585362
    Gerrit-PatchSet: 4
    Gerrit-Owner: Lijin Shen <laz...@google.com>
    Gerrit-Reviewer: Lijin Shen <laz...@google.com>
    Gerrit-Reviewer: Linyu He <lin...@google.com>
    Gerrit-Attention: Linyu He <lin...@google.com>
    Gerrit-Comment-Date: Wed, 18 Feb 2026 23:24:48 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Linyu He <lin...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Linyu He (Gerrit)

    unread,
    Feb 18, 2026, 6:28:49 PM (2 days ago) Feb 18
    to Lijin Shen, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Lijin Shen

    Linyu He voted and added 1 comment

    Votes added by Linyu He

    Code-Review+1

    1 comment

    File chrome/browser/ui/browser_window/internal/android/java/src/org/chromium/chrome/browser/ui/browser_window/ChromeAndroidTaskImpl.java
    Line 1285, Patchset 3: if (Objects.equals(activityWindowAndroid, key.mActivityWindowAndroid)) {
    Linyu He . resolved

    nit - use `activityScopedObjectsToRemove` for consistency with Line 1279.

    Also, just use `==` here? I think we do want to compare the references.

    Lijin Shen

    use activityScopedObjectsToRemove for consistency with Line 1279

    didn't quite follow here. which variable were you referring to?

    Linyu He

    My bad. No change is needed here as we need an ActivityWindowAndroid.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Lijin Shen
    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: I85e0361f89a9db0fbb68a3d6a6dc117e2aba8bcb
      Gerrit-Change-Number: 7585362
      Gerrit-PatchSet: 4
      Gerrit-Owner: Lijin Shen <laz...@google.com>
      Gerrit-Reviewer: Lijin Shen <laz...@google.com>
      Gerrit-Reviewer: Linyu He <lin...@google.com>
      Gerrit-Attention: Lijin Shen <laz...@google.com>
      Gerrit-Comment-Date: Wed, 18 Feb 2026 23:28:42 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Lijin Shen <laz...@google.com>
      Comment-In-Reply-To: Linyu He <lin...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Lijin Shen (Gerrit)

      unread,
      Feb 18, 2026, 9:19:44 PM (2 days ago) Feb 18
      to Sirisha Kavuluru, Linyu He, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
      Attention needed from Sirisha Kavuluru

      Lijin Shen added 1 comment

      Patchset-level comments
      File-level comment, Patchset 4 (Latest):
      Lijin Shen . resolved

      PTAL at ChromeActivity.java

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Sirisha Kavuluru
      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: I85e0361f89a9db0fbb68a3d6a6dc117e2aba8bcb
      Gerrit-Change-Number: 7585362
      Gerrit-PatchSet: 4
      Gerrit-Owner: Lijin Shen <laz...@google.com>
      Gerrit-Reviewer: Lijin Shen <laz...@google.com>
      Gerrit-Reviewer: Linyu He <lin...@google.com>
      Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Attention: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Comment-Date: Thu, 19 Feb 2026 02:19:31 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sirisha Kavuluru (Gerrit)

      unread,
      Feb 19, 2026, 12:45:37 PM (13 hours ago) Feb 19
      to Lijin Shen, Linyu He, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
      Attention needed from Lijin Shen

      Sirisha Kavuluru voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Lijin Shen
      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: I85e0361f89a9db0fbb68a3d6a6dc117e2aba8bcb
      Gerrit-Change-Number: 7585362
      Gerrit-PatchSet: 4
      Gerrit-Owner: Lijin Shen <laz...@google.com>
      Gerrit-Reviewer: Lijin Shen <laz...@google.com>
      Gerrit-Reviewer: Linyu He <lin...@google.com>
      Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Attention: Lijin Shen <laz...@google.com>
      Gerrit-Comment-Date: Thu, 19 Feb 2026 17:45:27 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Lijin Shen (Gerrit)

      unread,
      Feb 19, 2026, 2:19:54 PM (11 hours ago) Feb 19
      to Sirisha Kavuluru, Linyu He, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org

      Lijin Shen 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: I85e0361f89a9db0fbb68a3d6a6dc117e2aba8bcb
      Gerrit-Change-Number: 7585362
      Gerrit-PatchSet: 4
      Gerrit-Owner: Lijin Shen <laz...@google.com>
      Gerrit-Reviewer: Lijin Shen <laz...@google.com>
      Gerrit-Reviewer: Linyu He <lin...@google.com>
      Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Comment-Date: Thu, 19 Feb 2026 19:19:40 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Feb 19, 2026, 4:11:27 PM (9 hours ago) Feb 19
      to Lijin Shen, Sirisha Kavuluru, Linyu He, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      [ChromeAndroidTask] Support activity-scoped features

      This CL introduces support for features that are scoped to a specific
      ChromeActivity (via ActivityWindowAndroid) within a ChromeAndroidTask.

      - ChromeAndroidTaskFeatureKey: Added an optional ActivityWindowAndroid
      field to allow differentiating features by activity.

      - ChromeAndroidTaskImpl: Updated to destroy and remove features
      associated with an ActivityWindowAndroid when that activity's scoped
      objects are removed (e.g., during activity destruction).
      Bug: 483810146
      Change-Id: I85e0361f89a9db0fbb68a3d6a6dc117e2aba8bcb
      Reviewed-by: Sirisha Kavuluru <skav...@google.com>
      Commit-Queue: Lijin Shen <laz...@google.com>
      Reviewed-by: Linyu He <lin...@google.com>
      Cr-Commit-Position: refs/heads/main@{#1587373}
      Files:
      • M chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
      • M chrome/browser/ui/android/extensions/windowing/internal/java/src/org/chromium/chrome/browser/ui/extensions/windowing/ExtensionWindowControllerBridgeIntegrationTest.java
      • M chrome/browser/ui/browser_window/internal/android/java/src/org/chromium/chrome/browser/ui/browser_window/ChromeAndroidTaskImpl.java
      • M chrome/browser/ui/browser_window/internal/android/java/src/org/chromium/chrome/browser/ui/browser_window/ChromeAndroidTaskImplUnitTest.java
      • M chrome/browser/ui/browser_window/public/android/java/src/org/chromium/chrome/browser/ui/browser_window/ChromeAndroidTaskFeatureKey.java
      Change size: M
      Delta: 5 files changed, 89 insertions(+), 4 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Sirisha Kavuluru, +1 by Linyu He
      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: I85e0361f89a9db0fbb68a3d6a6dc117e2aba8bcb
      Gerrit-Change-Number: 7585362
      Gerrit-PatchSet: 5
      Gerrit-Owner: Lijin Shen <laz...@google.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Lijin Shen <laz...@google.com>
      Gerrit-Reviewer: Linyu He <lin...@google.com>
      Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
      open
      diffy
      satisfied_requirement

      Charles Hager (Gerrit)

      unread,
      Feb 19, 2026, 8:12:25 PM (5 hours ago) Feb 19
      to Chromium LUCI CQ, Lijin Shen, Sirisha Kavuluru, Linyu He, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org

      Charles Hager has created a revert of this change

      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: revert
      satisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages