Commit 7660af56 authored by Pedro Amaral's avatar Pedro Amaral Committed by Commit Bot

Remove obsolete BottomSheet methods

This change removes three methods from BottomSheet.java

Bug: 814528
Change-Id: Ib03a1ce24e41a69dd8124daabe8355196e82d072
Reviewed-on: https://chromium-review.googlesource.com/956264Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Pedro Amaral <amaralp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542895}
parent f4abd3df
......@@ -887,10 +887,6 @@ public class ChromeTabbedActivity
int accessibilityStringId = R.string.iph_download_home_accessibility_text;
if (FeatureUtilities.isChromeHomeEnabled()) {
accessibilityStringId = R.string.iph_download_home_accessibility_text_chrome_home;
if (getBottomSheet().isUsingExpandButton()) {
accessibilityStringId =
R.string.iph_download_home_accessibility_text_chrome_home_expand;
}
}
View anchorView = getToolbarAnchorViewForDownloadHomeTextBubble();
......@@ -905,21 +901,15 @@ public class ChromeTabbedActivity
turnOnHighlightForDownloadHomeTextBubble();
boolean isChromeHomeExpandButtonEnabled =
FeatureUtilities.isChromeHomeEnabled() && getBottomSheet().isUsingExpandButton();
int yInsetPx =
getResources().getDimensionPixelOffset(R.dimen.text_bubble_menu_anchor_y_inset);
rectProvider.setInsetPx(0, isChromeHomeExpandButtonEnabled ? yInsetPx : 0, 0,
FeatureUtilities.isChromeHomeEnabled() ? 0 : yInsetPx);
rectProvider.setInsetPx(0, 0, 0, yInsetPx);
textBubble.show();
}
private View getToolbarAnchorViewForDownloadHomeTextBubble() {
if (FeatureUtilities.isChromeHomeEnabled()) {
return getBottomSheet().isUsingExpandButton()
? mControlContainer.findViewById(R.id.expand_sheet_button)
: mControlContainer.findViewById(R.id.toolbar_handle);
return mControlContainer.findViewById(R.id.toolbar_handle);
} else {
return getToolbarManager().getMenuButton();
}
......
......@@ -1574,30 +1574,4 @@ public class BottomSheet
public @Nullable TextBubble getHelpBubbleForTests() {
return getIphBubbleController().getHelpBubbleForTests();
}
// ---------------------------------------------------------------------------------------------
// TODO(mdjones): Remove the methods below once bottom-toolbar Chrome Home is no longer
// supported.
// ---------------------------------------------------------------------------------------------
/**
* @return Whether or not the bottom sheet's toolbar is using the expand button.
*/
public boolean isUsingExpandButton() {
return false;
}
/**
* Defocus the omnibox.
*/
public void defocusOmnibox() {
throw new RuntimeException("This functionality is not supported in the base sheet.");
}
/**
* Set the color of the pull handle used by the toolbar.
*/
public void updateHandleTint() {
throw new RuntimeException("This functionality is not supported in the base sheet.");
}
}
......@@ -3174,9 +3174,6 @@ You must have Bluetooth and Location turned on in order to use the Physical Web.
<message name="IDS_IPH_DOWNLOAD_HOME_ACCESSIBILITY_TEXT_CHROME_HOME" desc="The in-product-help accessibility text to open download home after a restart in chrome home mode.">
Pull up the toolbar to find your files and pages in downloads
</message>
<message name="IDS_IPH_DOWNLOAD_HOME_ACCESSIBILITY_TEXT_CHROME_HOME_EXPAND" desc="The in-product-help accessibility text to open download home after a restart in chrome home mode with expand button enabled.">
Double tap the expand button to find your files and pages in downloads
</message>
<message name="IDS_IPH_DATA_SAVER_PREVIEW_TEXT" desc="In-product help for when a data saver preview page and infobar are shown.">
Chrome is using less data to show you this page
</message>
......
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