Make SidePanelRegistry explicitly owned.
This CL is a refactor with no intended behavior change. Prior to this CL, SidePanelRegistry inherited from SupportsUserData and was attached to both Browser and WebContents. After this CL, SidePanelCoordinator owns the window-scoped instance of the registry, and TabFeatures owns the tab-scoped instance of the registry. This CL makes the following minor changes on top: * The tab-scoped instance of ExtensionSidePanelManager is instantiated from TabFeatures rather than TabHelpers. * ExtensionSidePanelManager had methods named GetOrCreate*. They have been split into separate methods to Create and Get. * Some logic in SidePanelCoordinator previously relied on static getters returning nullptr during early startup/teardown. These edge cases have been called out explicitly, as the new instance-scoped getters always return non-nullptr. * SidePanelRegistry::Get was renamed to SidePanelRegistry::GetDeprecated. Not all use cases could be converted since many of the callsites do not yet use the Tab primitive. * The per-tab SidePanelRegistry is passed directly to per-tab controllers. * Two failing side search tests were deleted as the feature is dead but not yet removed. Change-Id: Ieb9473e65f20168a4f626eb8a6de01166c444e1c Bug: 345499793 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5612905 Commit-Queue: Erik Chen <erikchen@chromium.org> Reviewed-by:Caroline Rising <corising@chromium.org> Cr-Commit-Position: refs/heads/main@{#1338103}
Loading