| Index: chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
|
| index 58902cb15d127a7d1fe3b0cd4dab19e187007069..9a083ef68a1486ed53487c38324f72576de9d9c6 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
|
| @@ -39,6 +39,7 @@ import org.chromium.chrome.browser.tab.Tab;
|
| import org.chromium.chrome.browser.tabmodel.EmptyTabModelSelectorObserver;
|
| import org.chromium.chrome.browser.tabmodel.TabModel;
|
| import org.chromium.chrome.browser.tabmodel.TabModelSelector;
|
| +import org.chromium.chrome.browser.toolbar.BottomToolbarPhone;
|
| import org.chromium.chrome.browser.util.MathUtils;
|
| import org.chromium.chrome.browser.widget.FadingBackgroundView;
|
| import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetContentController.ContentType;
|
| @@ -192,7 +193,7 @@ public class BottomSheet
|
| * The default toolbar view. This is shown when the current bottom sheet content doesn't have
|
| * its own toolbar and when the bottom sheet is closed.
|
| */
|
| - private View mDefaultToolbarView;
|
| + private BottomToolbarPhone mDefaultToolbarView;
|
|
|
| /** Whether the {@link BottomSheet} and its children should react to touch events. */
|
| private boolean mIsTouchEnabled = true;
|
| @@ -226,6 +227,11 @@ public class BottomSheet
|
| View getToolbarView();
|
|
|
| /**
|
| + * @return Whether or not the toolbar is currently using a lightly colored background.
|
| + */
|
| + boolean isUsingLightToolbarTheme();
|
| +
|
| + /**
|
| * @return The vertical scroll offset of the content view.
|
| */
|
| int getVerticalScrollOffset();
|
| @@ -554,7 +560,22 @@ public class BottomSheet
|
| mBottomSheetContentContainer.addView(mPlaceholder, placeHolderParams);
|
|
|
| mToolbarHolder = (FrameLayout) mControlContainer.findViewById(R.id.toolbar_holder);
|
| - mDefaultToolbarView = mControlContainer.findViewById(R.id.toolbar);
|
| + mDefaultToolbarView = (BottomToolbarPhone) mControlContainer.findViewById(R.id.toolbar);
|
| + }
|
| +
|
| + /**
|
| + * Set the color of the pull handle used by the toolbar.
|
| + */
|
| + public void updateHandleTint() {
|
| + boolean isLightToolbarTheme = mDefaultToolbarView.isLightTheme();
|
| +
|
| + // If the current sheet content's toolbar is using a special theme, use that.
|
| + if (mSheetContent != null && mSheetContent.getToolbarView() != null) {
|
| + isLightToolbarTheme = mSheetContent.isUsingLightToolbarTheme();
|
| + }
|
| +
|
| + // A light toolbar theme means the handle should be dark.
|
| + mDefaultToolbarView.updateHandleTint(!isLightToolbarTheme);
|
| }
|
|
|
| @Override
|
| @@ -695,6 +716,7 @@ public class BottomSheet
|
| currentToolbar.setVisibility(View.GONE);
|
| }
|
| mToolbarFadeAnimator = null;
|
| + updateHandleTint();
|
| }
|
| });
|
|
|
|
|