Commit 7a90a691 authored by Pedro Amaral's avatar Pedro Amaral Committed by Commit Bot

Removing ChromeHomeIphBubbleController

Bug: 814528
Change-Id: I957587117090cfea68277964adabdf8464d77298
Reviewed-on: https://chromium-review.googlesource.com/967276Reviewed-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@{#544178}
parent 3c5a9f98
......@@ -501,9 +501,6 @@
<dimen name="selectable_list_toolbar_nav_button_start_offset">4dp</dimen>
<dimen name="selectable_list_search_icon_end_padding">4dp</dimen>
<!-- Bottom sheet dimensions -->
<dimen name="bottom_sheet_help_bubble_inset">10dp</dimen>
<!-- Chrome Home dimensions -->
<dimen name="chrome_home_min_full_half_distance">160dp</dimen>
......
......@@ -572,9 +572,6 @@ public class ChromeTabbedActivity
isShowingPromo = SigninPromoUtil.launchSigninPromoIfNeeded(this)
|| DataReductionPromoScreen.launchDataReductionPromo(
this, mTabModelSelectorImpl.getCurrentModel().isIncognito());
if (!isShowingPromo && getBottomSheet() != null) {
getBottomSheet().showColdStartHelpBubble();
}
} else {
preferenceManager.setPromosSkippedOnFirstStart(true);
}
......@@ -803,8 +800,6 @@ public class ChromeTabbedActivity
mLayoutManager.setEnableAnimations(DeviceClassManager.enableAnimations());
mLayoutManager.addOverviewModeObserver(this);
if (getBottomSheet() != null) getBottomSheet().setLayoutManagerChrome(mLayoutManager);
// TODO(yusufo): get rid of findViewById(R.id.url_bar).
initializeCompositorContent(mLayoutManager, findViewById(R.id.url_bar),
mContentContainer, mControlContainer);
......
......@@ -122,7 +122,6 @@ public class SwipeRefreshHandler implements OverscrollRefreshHandler {
if (mTab.getActivity() != null && mTab.getActivity().getBottomSheet() != null) {
Tracker tracker = TrackerFactory.getTrackerForProfile(Profile.getLastUsedProfile());
tracker.notifyEvent(EventConstants.PULL_TO_REFRESH);
mTab.getActivity().getBottomSheet().maybeShowHelpBubble(false, true);
}
attachSwipeRefreshLayoutIfNecessary();
......
......@@ -34,7 +34,6 @@ import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.ChromeSwitches;
import org.chromium.chrome.browser.NativePageHost;
import org.chromium.chrome.browser.TabLoadStatus;
import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChrome;
import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager;
import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager.FullscreenListener;
import org.chromium.chrome.browser.tab.Tab;
......@@ -45,7 +44,6 @@ import org.chromium.chrome.browser.util.AccessibilityUtil;
import org.chromium.chrome.browser.util.FeatureUtilities;
import org.chromium.chrome.browser.util.MathUtils;
import org.chromium.chrome.browser.widget.FadingBackgroundView;
import org.chromium.chrome.browser.widget.textbubble.TextBubble;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.SelectionPopupController;
import org.chromium.content_public.browser.WebContents;
......@@ -291,10 +289,6 @@ public class BottomSheet
/** The speed of the swipe the last time the sheet was opened. */
private long mLastSheetOpenMicrosPerDp;
// TODO(twellington): Remove this after Chrome Home launches.
/** The in-product help bubble controller used to display various help bubbles. */
private ChromeHomeIphBubbleController mIPHBubbleController;
/**
* An interface defining content that can be displayed inside of the bottom sheet for Chrome
* Home.
......@@ -535,13 +529,6 @@ public class BottomSheet
return true;
}
/**
* @param layoutManager The {@link LayoutManagerChrome} used to show and hide overview mode.
*/
public void setLayoutManagerChrome(LayoutManagerChrome layoutManager) {
getIphBubbleController().setLayoutManagerChrome(layoutManager);
}
/**
* @return Whether or not the toolbar Android View is hidden due to being scrolled off-screen.
*/
......@@ -570,7 +557,6 @@ public class BottomSheet
mTabModelSelector = activity.getTabModelSelector();
mFullscreenManager = activity.getFullscreenManager();
getIphBubbleController().setFullscreenManager(mFullscreenManager);
mToolbarHolder =
(TouchRestrictingFrameLayout) findViewById(R.id.bottom_sheet_toolbar_container);
mDefaultToolbarView = mToolbarHolder.findViewById(R.id.bottom_sheet_toolbar);
......@@ -1455,36 +1441,6 @@ public class BottomSheet
@Override
public void onFadingViewVisibilityChanged(boolean visible) {}
/**
* Show the in-product help bubble for the {@link BottomSheet} if it has not already been shown.
* This method must be called after the toolbar has had at least one layout pass.
*/
public void showColdStartHelpBubble() {
getIphBubbleController().showColdStartHelpBubble();
}
/**
* Show the in-product help bubble for the {@link BottomSheet} if conditions are right. This
* method must be called after the toolbar has had at least one layout pass and
* ChromeFeatureList has been initialized.
* @param fromMenu Whether the help bubble is being displayed in response to a click on the
* IPH menu header.
* @param fromPullToRefresh Whether the help bubble is being displayed due to a pull to refresh.
*/
public void maybeShowHelpBubble(boolean fromMenu, boolean fromPullToRefresh) {
getIphBubbleController().maybeShowHelpBubble(fromMenu, fromPullToRefresh);
}
/** Gets the IPH bubble controller, creating it if necessary. */
private ChromeHomeIphBubbleController getIphBubbleController() {
if (mIPHBubbleController == null) {
mIPHBubbleController =
new ChromeHomeIphBubbleController(getContext(), mToolbarHolder, this);
}
return mIPHBubbleController;
}
/**
* @return The default toolbar view.
*/
......@@ -1537,12 +1493,4 @@ public class BottomSheet
}
mToolbarHolder.setBackgroundColor(Color.TRANSPARENT);
}
/**
* @return The bottom sheet's help bubble if it exists.
*/
@VisibleForTesting
public @Nullable TextBubble getHelpBubbleForTests() {
return getIphBubbleController().getHelpBubbleForTests();
}
}
......@@ -57,7 +57,6 @@ public class ChromeHomeIphMenuHeader extends LinearLayout implements OnClickList
.notifyEvent(EventConstants.CHROME_HOME_MENU_HEADER_CLICKED);
mActivity.getBottomSheet().getBottomSheetMetrics().recordInProductHelpMenuItemClicked();
mActivity.getBottomSheet().maybeShowHelpBubble(true, false);
mActivity.getAppMenuHandler().hideAppMenu();
......@@ -89,4 +88,4 @@ public class ChromeHomeIphMenuHeader extends LinearLayout implements OnClickList
ThreadUtils.assertOnUiThread();
sTestObserver = observer;
}
}
\ No newline at end of file
}
......@@ -3206,15 +3206,6 @@ You must have Bluetooth and Location turned on in order to use the Physical Web.
</message>
<!-- Chrome Home -->
<message name="IDS_BOTTOM_SHEET_HELP_BUBBLE_MESSAGE" desc="Text displayed in a help bubble above the bottom navigation sheet prompting users to pull the sheet up to see their bookmarks and other content.">
Pull up to see bookmarks and more
</message>
<message name="IDS_BOTTOM_SHEET_PULL_TO_REFRESH_HELP_BUBBLE_MESSAGE" desc="Text displayed in a help bubble above the address bar. “access” is a verb (imperative). The intent of the string is to help users find the address bar at the bottom of the screen.">
Access the address bar here
</message>
<message name="IDS_BOTTOM_SHEET_PULL_TO_REFRESH_HELP_BUBBLE_ACCESSIBILITY_MESSAGE" desc="Text displayed in a help bubble above the address bar when TalkBack is enabled. “access” is a verb (imperative). The intent of the string is to help users find the address bar at the bottom of the screen.">
Access the address bar at the bottom of your screen
</message>
<message name="IDS_BOTTOM_SHEET_ACCESSIBILITY_DESCRIPTION" desc="Accessibility string read when the navigation panel is focused informing the user that the panel can be closed by swiping down.">
Navigation panel. Swipe down to close.
</message>
......
......@@ -1414,7 +1414,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetSwipeDetector.java",
"java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetMetrics.java",
"java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetObserver.java",
"java/src/org/chromium/chrome/browser/widget/bottomsheet/ChromeHomeIphBubbleController.java",
"java/src/org/chromium/chrome/browser/widget/bottomsheet/ChromeHomeIphMenuHeader.java",
"java/src/org/chromium/chrome/browser/widget/bottomsheet/EmptyBottomSheetObserver.java",
"java/src/org/chromium/chrome/browser/widget/displaystyle/MarginResizer.java",
......
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