Commit ca65e7e2 authored by David Maunder's avatar David Maunder Committed by Commit Bot

Close snackbar when the user initiates the closing of a Tab

Currently we don't do this and it means the user can group tabs,
close one of the tabs in the group and then undo the grouping.
Because one of the tabs is destroyed this leads to a crash when
we try to update its root id.

Bug: 1117396
Change-Id: I0d91d44ce2bf8783531ccb3c959010fdf6905fb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414995
Commit-Queue: David Maunder <davidjm@chromium.org>
Reviewed-by: default avatarWei-Yin Chen (陳威尹) <wychen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808090}
parent ff914861
...@@ -98,6 +98,12 @@ public class UndoGroupSnackbarController implements SnackbarManager.SnackbarCont ...@@ -98,6 +98,12 @@ public class UndoGroupSnackbarController implements SnackbarManager.SnackbarCont
UndoGroupSnackbarController.this); UndoGroupSnackbarController.this);
} }
@Override
public void willCloseTab(Tab tab, boolean animate) {
mSnackbarManageable.getSnackbarManager().dismissSnackbars(
UndoGroupSnackbarController.this);
}
@Override @Override
public void didCloseTab(int tabId, boolean incognito) { public void didCloseTab(int tabId, boolean incognito) {
mSnackbarManageable.getSnackbarManager().dismissSnackbars( mSnackbarManageable.getSnackbarManager().dismissSnackbars(
......
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