Make UrlLoadingBrowserAgent support navigating a background tab. [chromium/src : main]

0 views
Skip to first unread message

Kirubel Aklilu (Gerrit)

unread,
Feb 11, 2026, 5:08:22 PM (10 hours ago) Feb 11
to Mark Cogan, Matt Reichhoff, Chromium LUCI CQ, AyeAye, feature-me...@chromium.org, marq+...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org

Kirubel Aklilu voted and added 1 comment

Votes added by Kirubel Aklilu

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 11 (Latest):
Kirubel Aklilu . unresolved

@marq,

I found some more instances in the LoadUrlInCurrentTab impl that assumes the WebState is the currently active/foregrounded tab. I considered a few ways around this:

1. Revert the changes to LoadChangesInCurrentTab. Introduce a separate LoadChangesInTab which has an independent and simpler impl. (Although it seems not-great to have the behavior diverge).
1. Update the UrlLoadingNotifierBrowserAgent and underlying observers to take in the WebState instead of assuming the url was loaded in the active tab. There was only a handful of observers that needed to be updated (3 non-tests, [codesearch](https://source.chromium.org/search?q=(TabWillLoadUrl%7CTabDidLoadUrl%7CTabFailedToLoadUrl%7CTabDidPrerenderUrl%7CTabDidReloadUrl%7CTabDidLoadUrl%7CNewTabWillLoadUrl%7CNewTabDidLoadUrl%7CWillSwitchToTabWithUrl%7CDidSwitchToTabWithUrl)%20-f:url_loading%20%20&sq=)).
1. Update LoadUrlInTab throughout to check if `target_web_state` is the active tab. I chose against this to avoid unneeded nesting.

I ended up going with option 2. WDYT?

Open in Gerrit

Related details

Attention set is empty
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: I7071bab08400994815ba4316e2ff09906a6a6964
Gerrit-Change-Number: 7558876
Gerrit-PatchSet: 11
Gerrit-Owner: Kirubel Aklilu <kak...@chromium.org>
Gerrit-Reviewer: Kirubel Aklilu <kak...@chromium.org>
Gerrit-Reviewer: Mark Cogan <ma...@chromium.org>
Gerrit-CC: Matt Reichhoff <mreic...@chromium.org>
Gerrit-Comment-Date: Wed, 11 Feb 2026 22:08:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages