Commit a45bb8ef authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

weblayer: remove conditional for ModalDialogManager

As of
https://chromium-review.googlesource.com/c/chromium/src/+/2386320
no longer calls onDialogVisibilityChanged() if there were no dialogs.
This means the conditional checking for mTab can now be removed.

BUG=1121388
TEST=covered by test

Change-Id: I1e82d17360f3623200ecf67686a65288b4305020
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2392744Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804440}
parent c752cc99
......@@ -299,12 +299,9 @@ public final class BrowserViewController
private void onDialogVisibilityChanged(boolean showing) {
if (WebLayerFactoryImpl.getClientMajorVersion() < 82) return;
// ModalDialogManager.onLastDialogDismissed() may be called if |mTab| is currently null.
// This is because in some situations ModalDialogManager calls onLastDialogDismissed() even
// if there were no dialogs present and dismissDialog() is called. This matters as
// dismissDialog() may be called when |mTab| is null.
// TODO(sky): fix ModalDialogManager and remove mTab conditional.
if (mModalDialogManager.getCurrentType() == ModalDialogType.TAB && mTab != null) {
// This should never be called when |mTab| is null.
assert mTab != null;
if (mModalDialogManager.getCurrentType() == ModalDialogType.TAB) {
try {
mTab.getClient().onTabModalStateChanged(showing);
} catch (RemoteException e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment