[ios] Fixes Infobar presentation for contained BVC.
On M83 the BVC will be contained by the TabGrid rather than being presented. This requires some updating to the Messages presentation logic, which is done via this CL. - BVC now informs the InfobarContainer that it will disappear, when this happens no Infobar should be presented, until BVC "appears" again. - Fixes a bug where presenting a Banner while BVC is being dismissed would cause the Banner to remain on screen since now its presenting ViewController is not being dismissed. shouldDismissBanner was added to the InfobarBannerContainer protocol so a banner can ask its container if it should dismiss itself after being presented. - On InfobarCoordinator we shouldn't always rely on the baseVC (BVC) presenting Banners, that's why when dismissing a banner we check its presentingVC instead of BVC presentedVC, this approach would've been safer even when BVC wasn't contained. Bug: 1062245 Change-Id: I1d0641cd6e047a72eea9bec79997da4885d2953c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2160808Reviewed-by:Chris Lu <thegreenfrog@chromium.org> Reviewed-by:
Kurt Horimoto <kkhorimoto@chromium.org> Commit-Queue: Sergio Collazos <sczs@chromium.org> Cr-Commit-Position: refs/heads/master@{#762129}
Showing
Please register or sign in to comment