[iOS] Don't attempt to present UI for new request if already presenting.

When a navigation occurs, all OverlayRequests are cancelled, which
triggers the dismissal of any presented overlay UI.  The request queue
is empty at this point, so if the newly-loaded page attempts to present
a dialog on load, it's possible that OverlayPresenterImpl will try to
show this dialog before the cancelled dialog's UI is finished being
dismissed.  This CL adds a check to prevent attempting to present if
already presenting.  If a cancelled overlay is being dismissed, the new
request's UI will be presented upon the completion of the dismissal.

Bug: 990966
Change-Id: Iee7e735b53c9844666d6ea7cc48168513d768f0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1736182
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Auto-Submit: Kurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684217}
1 file changed