[iOS] Create OverlayRequestQueueCallbackInstaller
This is a helper object that installs callbacks for every request that is added to an OverlayRequestQueue. It uses OverlayRequestQueueImpl:: Observer to detect newly-added requests, and installs callbacks on each added request using a list of OverlayRequestCallbackInstallers. This CL also updates OverlayRequestQueueImpl::Observer to include OverlayRequestQueueDestroyed(). This was not necessary before since the only queue observer was OverlayPresenterImpl, which is Browser-scoped and guaranteed to outlive all WebState-scoped queues. No such guarantee is made by OverlayRequestQueueCallbackInstaller, so a destruction observer callback is used to stop observation. Additionally, OverlayRequestQueueImpl::FromWebState() was added in order to safely fetch an OverlayRequestQueueImpl from the queue callback installer in order to observe the queues. Bug: 1030357 Change-Id: Ie1769b593f637a29dae9efe13de5e4d7d5a58164 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032680 Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org> Reviewed-by:Mike Dougherty <michaeldo@chromium.org> Cr-Commit-Position: refs/heads/master@{#737880}
Showing
Please register or sign in to comment