Commit cb93bf15 authored by Matthew Jones's avatar Matthew Jones Committed by Commit Bot

Remove intent handling logic for bottom sheet

Since the bottom sheet is now largely per-tab, there is logic that
closes the sheet when a new tab is selected or when a page navigates.
This handles the cases for intents, making the code that was removed
by this patch obsolete.

Bug: 833574
Change-Id: Ibe09ce81f96946eeb8980e2a79dbd9db7f56cb6f
Reviewed-on: https://chromium-review.googlesource.com/1020061Reviewed-by: default avatarTheresa <twellington@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552428}
parent fb0e6975
......@@ -131,7 +131,6 @@ import org.chromium.chrome.browser.vr_shell.VrShellDelegate;
import org.chromium.chrome.browser.widget.OverviewListLayout;
import org.chromium.chrome.browser.widget.ViewHighlighter;
import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet;
import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.StateChangeReason;
import org.chromium.chrome.browser.widget.emptybackground.EmptyBackgroundViewWrapper;
import org.chromium.chrome.browser.widget.textbubble.TextBubble;
import org.chromium.components.feature_engagement.EventConstants;
......@@ -1189,19 +1188,6 @@ public class ChromeTabbedActivity
boolean fromLauncherShortcut = IntentUtils.safeGetBooleanExtra(
intent, IntentHandler.EXTRA_INVOKED_FROM_SHORTCUT, false);
if (getBottomSheet() != null) {
// Either a url is being loaded in a new tab, a tab is being clobbered, or a tab
// is being brought to the front. In all scenarios, the bottom sheet should be
// closed. If a tab is being brought to the front, this indicates the user is coming
// back to Chrome through external means (e.g. homescreen shortcut, media
// notification) and animating the sheet closing is extraneous.
boolean animateSheetClose = tabOpenType == TabOpenType.CLOBBER_CURRENT_TAB
|| tabOpenType == TabOpenType.OPEN_NEW_TAB
|| tabOpenType == TabOpenType.OPEN_NEW_INCOGNITO_TAB;
getBottomSheet().setSheetState(BottomSheet.SHEET_STATE_PEEK, animateSheetClose,
StateChangeReason.NAVIGATION);
}
TabModel tabModel = getCurrentTabModel();
switch (tabOpenType) {
case REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB:
......
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