| Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java
|
| index af5e6db1809dde3b681d3c632650180f7c22519a..ad58484f2c65c2fc23972b49363b71d1d4180380 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java
|
| @@ -8,11 +8,19 @@ import android.content.Context;
|
| import android.util.AttributeSet;
|
|
|
| import org.chromium.chrome.R;
|
| +import org.chromium.chrome.browser.widget.BottomSheet;
|
|
|
| /**
|
| * Phone specific toolbar that exists at the bottom of the screen.
|
| */
|
| public class BottomToolbarPhone extends ToolbarPhone {
|
| +
|
| + /** A handle to the bottom sheet. */
|
| + private BottomSheet mBottomSheet;
|
| +
|
| + /** The state of the bottom sheet before the URL bar was focused. */
|
| + private int mStateBeforeUrlFocus;
|
| +
|
| /**
|
| * Constructs a BottomToolbarPhone object.
|
| * @param context The Context in which this View object is created.
|
| @@ -28,4 +36,19 @@ public class BottomToolbarPhone extends ToolbarPhone {
|
| // be at the top of the toolbar.
|
| return getContext().getResources().getDimensionPixelSize(R.dimen.toolbar_shadow_height);
|
| }
|
| +
|
| + @Override
|
| + protected void triggerUrlFocusAnimation(final boolean hasFocus) {
|
| + super.triggerUrlFocusAnimation(hasFocus);
|
| +
|
| + if (mBottomSheet == null) return;
|
| +
|
| + if (hasFocus) mStateBeforeUrlFocus = mBottomSheet.getSheetState();
|
| + mBottomSheet.setSheetState(hasFocus ? BottomSheet.STATE_FULL : mStateBeforeUrlFocus, true);
|
| + }
|
| +
|
| + @Override
|
| + public void setBottomSheet(BottomSheet sheet) {
|
| + mBottomSheet = sheet;
|
| + }
|
| }
|
|
|